From: shane.xb.qian Date: Thu, 12 Jan 2023 06:46:47 +0000 (+0800) Subject: fix: codeaction command of cmd maybe not existed X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=f0609c96ab740f650f112de50b1c9cb6f81e35a7;p=vim-lsp.git fix: codeaction command of cmd maybe not existed --- diff --git a/autoload/lsp/codeaction.vim b/autoload/lsp/codeaction.vim index 213460b..5a34d90 100644 --- a/autoload/lsp/codeaction.vim +++ b/autoload/lsp/codeaction.vim @@ -13,7 +13,7 @@ export def RegisterCmdHandler(cmd: string, Handler: func) enddef def DoCommand(lspserver: dict, cmd: dict) - if CommandHandlers->has_key(cmd.command) + if cmd->has_key('command') && CommandHandlers->has_key(cmd.command) var CmdHandler: func = CommandHandlers[cmd.command] call CmdHandler(cmd) else