From: ycycyyc <944696498@qq.com> Date: Tue, 21 Mar 2023 14:31:45 +0000 (+0800) Subject: fix: use the corrent starttext value X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=6341dcbfbd5dc80b6d332505528519744c84ff07;p=vim-lsp.git fix: use the corrent starttext value --- diff --git a/autoload/lsp/completion.vim b/autoload/lsp/completion.vim index fe9799d..65ad42b 100644 --- a/autoload/lsp/completion.vim +++ b/autoload/lsp/completion.vim @@ -90,7 +90,7 @@ export def CompletionReply(lspserver: dict, cItems: any) # Get the keyword prefix before the current cursor column. var chcol = charcol('.') - var starttext = getline('.')[ : chcol - 1] + var starttext = getline('.')[ : chcol - 2] var [prefix, start_idx, end_idx] = starttext->tolower()->matchstrpos('\k*$') var start_col = start_idx + 1