]> Sergey Matveev's repositories - vim-lsp.git/commitdiff
fix: compl item maybe is 'string'!
authorshane.xb.qian <shane.qian@foxmail.com>
Tue, 15 Nov 2022 02:42:36 +0000 (10:42 +0800)
committershane.xb.qian <shane.qian@foxmail.com>
Tue, 15 Nov 2022 02:42:36 +0000 (10:42 +0800)
autoload/lsp/completion.vim

index 8138e56eae3828ede57c3a387615b76cc07d3f9f..f8bbc0010d557664496d48f12fdbcd295a0fa7d0 100644 (file)
@@ -192,6 +192,7 @@ export def CompletionResolveReply(lspserver: dict<any>, cItem: dict<any>)
   if cInfo->empty()
       || !cInfo.pum_visible
       || cInfo.selected == -1
+      || cInfo.items[cInfo.selected]->type() != v:t_dict
       || cInfo.items[cInfo.selected].user_data.label != cItem.label
     return
   endif
@@ -239,6 +240,7 @@ export def CompletionResolveReply(lspserver: dict<any>, cItem: dict<any>)
   if cInfo->empty()
       || !cInfo.pum_visible
       || cInfo.selected == -1
+      || cInfo.items[cInfo.selected]->type() != v:t_dict
       || cInfo.items[cInfo.selected].user_data.label != cItem.label
     return
   endif