-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ctrl+o broken after :GoDef #1026
Comments
Use |
I understand the difference between the jump list and the tag stack, but in my experience most environments treat jumping to a tag definition as a location change, such that either ctrl-t or ctrl-o would jump backwards to the same previous location. The bisected commit message doesn't mention changing this behavior, which made me suspect it was unintentional. |
Hi @dmac As @nhooyr said you should use |
Yes, exactly. I'm actually not aware of any language plugin which implements a "go to definition" command that doesn't also add that movement to the jump list (though I'd be happy to see counterexamples). Also worth noting is that the default behavior of |
Fixed with #1029 |
Awesome, thanks for the quick fix! |
Actual behavior
After using :GoDef (or gd from normal mode) to jump to a definition, using ctrl+o to jump back to the previous location will often not work, sending you to the wrong location.
Expected behavior
Using ctrl+o after gd should send you back to the previous location. It should be possible to gd then ctrl+o repeatedly to move back and forth between a usage and definition.
Steps to reproduce:
foo.go:
Repro:
foo()
call inmain
.gd
andctrl+o
repeatedly to try to move back and forth between the usage and definition offoo
.I bisected and found 445e5bf to be the first commit where this repros for me.
Configuration
go version go1.7 darwin/amd64
The text was updated successfully, but these errors were encountered: