From: Dayvid Albuquerque <115833146+D4yvid@users.noreply.github.com> Date: Thu, 13 Apr 2023 14:53:08 +0000 (-0300) Subject: Remove the if statement and use `get` instead X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=07e0cfc4e95ad3caf1a326e05c536ae9df99deb7;p=vim-lsp.git Remove the if statement and use `get` instead --- diff --git a/autoload/lsp/completion.vim b/autoload/lsp/completion.vim index 799b085..d6d1352 100644 --- a/autoload/lsp/completion.vim +++ b/autoload/lsp/completion.vim @@ -126,10 +126,7 @@ export def CompletionReply(lspserver: dict, cItems: any) items = cItems else items = cItems.items - - if cItems->has_key("isIncomplete") - lspserver.completeItemsIsIncomplete = cItems.isIncomplete - endif + lspserver.completeItemsIsIncomplete = cItems->get('isIncomplete', false) endif # Get the keyword prefix before the current cursor column.