]> Sergey Matveev's repositories - vim-lsp.git/commitdiff
fix: should allow autocompl items icase work and be more smooth
authorshane.xb.qian <shane.qian@foxmail.com>
Wed, 15 Mar 2023 12:27:59 +0000 (20:27 +0800)
committershane.xb.qian <shane.qian@foxmail.com>
Wed, 15 Mar 2023 12:27:59 +0000 (20:27 +0800)
Signed-off-by: shane.xb.qian <shane.qian@foxmail.com>
autoload/lsp/completion.vim

index ef16da42e0abfd08baaafc9ccc5007e474a3a4fa..d0d24513fb9b9b1cbe7fafc59254e9fcb2e9585e 100644 (file)
@@ -106,8 +106,8 @@ export def CompletionReply(lspserver: dict<any>, cItems: any)
       d.word = MakeValidWord(d.word)
     else
       # plain text completion.  If the completion item text doesn't start with
-      # the current keyword prefix, skip it.
-      if prefix != '' && stridx(d.word, prefix) != 0
+      # the current (case ignored) keyword prefix, skip it.
+      if prefix != '' && d.word !~? $'^{prefix}'
        continue
       endif
     endif