Skip to content
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

Goto declaration doesn't update the location stack correctly anymore #1028

Closed
rboyer opened this issue Aug 26, 2016 · 1 comment
Closed

Goto declaration doesn't update the location stack correctly anymore #1028

rboyer opened this issue Aug 26, 2016 · 1 comment

Comments

@rboyer
Copy link

rboyer commented Aug 26, 2016

Actual behavior

In a normal go source file I use the gd command to go to the definition of a symbol. This works fine, but when I attempt to go back using Ctrl-O it takes me to other places that make no sense.

Expected behavior

gd + Ctrl-O should cancel out. This used to work, but I can't tell you how far back it used to work.

Steps to reproduce:

Minimal vimrc (in neovim):

call plug#begin('~/.vim/plugged')
Plug 'fatih/vim-go'
call plug#end()

Minimal go source file to see the problem:

package main

import "fmt"

const iso = "blah"

func main() {
    fmt.Printf("iso=%q", iso)
}
  1. Manually navigate to the Printf line with your cursor on the iso variable.
  2. Press gd to go to the definition of the constant.
  3. Press Ctrl-O and the cursor returns to the first line of the file.

Configuration

Add here your current configuration and additional information that might be
useful, such as:

  • vim version: NVIM 0.1.6-dev (ubuntu 16.04 + neovim PPA)
  • vim-go version 63bdcdf65b10a2080d2a534879177bc254e2761e
  • go version 1.7
@nhooyr
Copy link
Contributor

nhooyr commented Aug 26, 2016

Duplicate of #1026

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants