]> Sergey Matveev's repositories - vim-lsp.git/commitdiff
fix: use the corrent starttext value
authorycycyyc <944696498@qq.com>
Tue, 21 Mar 2023 14:31:45 +0000 (22:31 +0800)
committerycycyyc <944696498@qq.com>
Tue, 21 Mar 2023 14:31:45 +0000 (22:31 +0800)
autoload/lsp/completion.vim

index fe9799d02c71ef71d362ea21ab6abb4df3777588..65ad42bfdad7eb50819007858fb718693e06e574 100644 (file)
@@ -90,7 +90,7 @@ export def CompletionReply(lspserver: dict<any>, 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