-
-
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
GoExtract sends incorrect location to LSP #3615
Labels
Comments
I can duplicate what you're describing. Interestingly, Vim's help has this to say about the visual markers:
Which corresponds to what we're seeing here. I'll see if there's a correct way to figure out the full extent of the visual selection. |
bhcleek
added a commit
to bhcleek/vim-go
that referenced
this issue
Dec 24, 2023
Fix line selection for extraction. Fixes fatih#3615
bhcleek
added a commit
to bhcleek/vim-go
that referenced
this issue
Dec 24, 2023
Fix line selection for extraction. Fixes fatih#3615
bhcleek
added a commit
to bhcleek/vim-go
that referenced
this issue
Dec 24, 2023
Fix line selection for extraction. Fixes fatih#3615
bhcleek
added a commit
to bhcleek/vim-go
that referenced
this issue
Dec 24, 2023
Fix line selection for extraction. Fixes fatih#3615
bhcleek
added a commit
to bhcleek/vim-go
that referenced
this issue
Dec 24, 2023
Fix line selection for extraction. Fixes fatih#3615
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What did you do?
I tried to use
:GoExtract
on lines of code. Take this code as an exampleI selected lines 6 -> 8 (either via linewise visual mode or regular one) then run
:'<,'>GoExtract
.What did you expect to happen?
All the 3
fmt.Println
lines get extracted to a new function, resulting in something like this.What happened instead?
Only the last 2
fmt.Println
lines get extracted. Resulting in.Configuration (MUST fill this out):
vim-go version:
Commit
7fb38264e3ab5c57a43de2470f22eccc62f82c02
(latest commit onmaster
).vimrc
you used to reproduce:vimrc
Vim version (first three lines from
:version
):Go version (
go version
):Go environment
go env
Output:gopls version
gopls version
Output:The text was updated successfully, but these errors were encountered: