mirror of
https://github.com/neovim/neovim.git
synced 2025-09-09 04:48:18 +00:00
fix(lsp): progress handlers should return vim.NIL on error (#16476)
This commit is contained in:
![41898282+github-actions[bot]@users.noreply.github.com](/assets/img/avatar_default.png)
committed by
GitHub

parent
faf3159ab0
commit
fb11ef0aad
@@ -28,7 +28,7 @@ local function progress_handler(_, result, ctx, _)
|
|||||||
local client_name = client and client.name or string.format("id=%d", client_id)
|
local client_name = client and client.name or string.format("id=%d", client_id)
|
||||||
if not client then
|
if not client then
|
||||||
err_message("LSP[", client_name, "] client has shut down after sending the message")
|
err_message("LSP[", client_name, "] client has shut down after sending the message")
|
||||||
return
|
return vim.NIL
|
||||||
end
|
end
|
||||||
local val = result.value -- unspecified yet
|
local val = result.value -- unspecified yet
|
||||||
local token = result.token -- string or number
|
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)
|
local client_name = client and client.name or string.format("id=%d", client_id)
|
||||||
if not client then
|
if not client then
|
||||||
err_message("LSP[", client_name, "] client has shut down after sending the message")
|
err_message("LSP[", client_name, "] client has shut down after sending the message")
|
||||||
return
|
return vim.NIL
|
||||||
end
|
end
|
||||||
client.messages.progress[token] = {}
|
client.messages.progress[token] = {}
|
||||||
return vim.NIL
|
return vim.NIL
|
||||||
|
Reference in New Issue
Block a user