We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1a7a6e0 commit d2cbe80Copy full SHA for d2cbe80
autoload/lsp/ui/vim/completion.vim
@@ -138,10 +138,10 @@ function! s:on_complete_done_after() abort
138
" The VSCode always apply completion word as snippet.
139
" It means we should place cursor to end of new inserted text as snippet does.
140
let l:lines = lsp#utils#_split_by_eol(l:text)
141
- let l:end = l:range.end
142
- let l:end.line += len(l:lines) - 1
143
- let l:end.character = strchars(l:text[-1]) + (len(l:lines) > 1 ? 0 : l:end.character)
144
- call cursor(lsp#utils#position#lsp_to_vim('%', l:end))
+ let l:start = l:range.start
+ let l:start.line += len(l:lines) - 1
+ let l:start.character += strchars(l:lines[-1])
+ call cursor(lsp#utils#position#lsp_to_vim('%', l:start))
145
endif
146
147
0 commit comments