]> Sergey Matveev's repositories - vim-lsp.git/commitdiff
End omni search when the language server replies with nothing
authorAndreas Louv <andreas@louv.dk>
Mon, 3 Apr 2023 21:38:54 +0000 (23:38 +0200)
committerAndreas Louv <andreas@louv.dk>
Mon, 3 Apr 2023 21:50:30 +0000 (23:50 +0200)
autoload/lsp/completion.vim

index 5f2869c1778095acfb5a5446f863c72f1c92301f..138f2d3b49f0a0b20dfa3abdf672466f03a5675d 100644 (file)
@@ -75,6 +75,10 @@ enddef
 # Result: CompletionItem[] | CompletionList | null
 export def CompletionReply(lspserver: dict<any>, cItems: any)
   if cItems->empty()
+    if lspserver.omniCompletePending
+      lspserver.completeItems = []
+      lspserver.omniCompletePending = false
+    endif
     return
   endif