Closed novadev94 closed 6 months ago
I can duplicate what you're describing. Interestingly, Vim's help has this to say about the visual markers:
*'<* *`<*
'< `< To the first line or character of the last selected
Visual area in the current buffer. For block mode it
may also be the last character in the first line (to
be able to define the block).
*'>* *`>*
'> `> To the last line or character of the last selected
Visual area in the current buffer. For block mode it
may also be the first character of the last line (to
be able to define the block). Note that 'selection'
applies, the position may be just after the Visual
area.
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.
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 call plug#begin('~/.nvim/.plugs') Plug 'fatih/vim-go' call plug#end() ```Vim version (first three lines from
:version
):Go version (
go version
):Go environment
go env
Output:gopls version
gopls version
Output: