]> Sergey Matveev's repositories - vim-lsp.git/commitdiff
Check for dict type before checking for keys
authorSantosh Bandichode <santosh.bandichode@cyberium.info>
Sun, 13 Nov 2022 09:39:43 +0000 (15:09 +0530)
committerSantosh Bandichode <santosh.bandichode@cyberium.info>
Sun, 13 Nov 2022 09:39:43 +0000 (15:09 +0530)
autoload/lsp/completion.vim

index 1c5e702047245783aff545b4edf9dc3265072ca0..e539e0ecac68582268812d8f67d23b8e351dcf1c 100644 (file)
@@ -354,7 +354,7 @@ def LspSetFileType()
   endif
 
   var cItem = item.user_data
-  if !cItem->has_key('documentation') || cItem->type() != v:t_dict
+  if cItem->type() != v:t_dict || !cItem->has_key('documentation')
                                || cItem.documentation.kind != 'markdown'
     return
   endif