go-types-atom
go-types-atom copied to clipboard
Issue: go files scroll to top on focus
Has anyone else complained of files scrolling up (or to somewhere random) whenever they gain focus? Eg if you have split panes or and go from left pane to right then back with focus, the left pane has scrolled up much further than the cursor was last time I was in the file.
I'm not sure if go-types is causing this or something else, so i've temporarily disabled the package to test, but I don't recall it happening before go-types was installed.
Okay I figured out what is happening. Here is how to reproduce and more info. You can tell me if this is intended behavior, but it was driving me insane :)
- Open up two go files. Say
a.goandb.go - While
a.gois in focus, click on a method or type in go-types. This will scroll you to that type. - Scroll up or down a bit. Preferably enough to get that type off the screen.
- Go to
b.goand give it focus - Give
a.gofocus again. It will automatically scroll you to wherever you last clicked in go-types regardless of where you had been before leaving focus.
Here is a gif: 
When I go back to demo.go my cursor isn't at the top like I left it, but is instead at the bottom of the file. This is even more annoying when you work with split panes on a wider monitor, as the problem persists and every time I change panes I get moved around the file based on what I last clicked in go-types.
That gif repeating might make it slightly annoying to follow.. 😦
This is annoying me now too.. I hadn't experienced it before.
Let me see if I can find a fix. Thanks for getting a reproducible example.
@natdm Did this ever get fixed? Was going to reenable the plugin soon if so 😄
If not, can I help at all?