aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/vim/lsp/handlers.lua
diff options
context:
space:
mode:
authorMichael Lingelbach <m.j.lbach@gmail.com>2021-11-30 21:26:14 -0500
committerGitHub <noreply@github.com>2021-11-30 21:26:14 -0500
commit730a9514dcf540c4921bbe45c1c8849f773bae39 (patch)
treec6a8d1a0c57b956efd00184007d1c82062a7019e /runtime/lua/vim/lsp/handlers.lua
parent8ae7dabc10804bb1cceb2df06085b06d20c79bed (diff)
downloadrneovim-730a9514dcf540c4921bbe45c1c8849f773bae39.tar.gz
rneovim-730a9514dcf540c4921bbe45c1c8849f773bae39.tar.bz2
rneovim-730a9514dcf540c4921bbe45c1c8849f773bae39.zip
fix(lsp): progress handlers should return vim.NIL on error (#16472)
Diffstat (limited to 'runtime/lua/vim/lsp/handlers.lua')
-rw-r--r--runtime/lua/vim/lsp/handlers.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/runtime/lua/vim/lsp/handlers.lua b/runtime/lua/vim/lsp/handlers.lua
index ebf504fd42..22089aaaa6 100644
--- a/runtime/lua/vim/lsp/handlers.lua
+++ b/runtime/lua/vim/lsp/handlers.lua
@@ -28,7 +28,7 @@ local function progress_handler(_, result, ctx, _)
local client_name = client and client.name or string.format("id=%d", client_id)
if not client then
err_message("LSP[", client_name, "] client has shut down after sending the message")
- return
+ return vim.NIL
end
local val = result.value -- unspecified yet
local token = result.token -- string or number
@@ -70,7 +70,7 @@ M['window/workDoneProgress/create'] = function(_, result, ctx)
local client_name = client and client.name or string.format("id=%d", client_id)
if not client then
err_message("LSP[", client_name, "] client has shut down after sending the message")
- return
+ return vim.NIL
end
client.messages.progress[token] = {}
return vim.NIL