From 6341dcbfbd5dc80b6d332505528519744c84ff07 Mon Sep 17 00:00:00 2001 From: ycycyyc <944696498@qq.com> Date: Tue, 21 Mar 2023 22:31:45 +0800 Subject: [PATCH] fix: use the corrent starttext value --- autoload/lsp/completion.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- 2.48.1