mirror of
https://github.com/neovim/neovim.git
synced 2025-09-06 03:18:16 +00:00
fix(lsp): reset active request when reporting an error
This commit is contained in:
@@ -294,9 +294,16 @@ function STHighlighter:send_request()
|
|||||||
local c = vim.lsp.get_client_by_id(ctx.client_id)
|
local c = vim.lsp.get_client_by_id(ctx.client_id)
|
||||||
local bufnr = assert(ctx.bufnr)
|
local bufnr = assert(ctx.bufnr)
|
||||||
local highlighter = STHighlighter.active[bufnr]
|
local highlighter = STHighlighter.active[bufnr]
|
||||||
if not err and c and highlighter then
|
if not (c and highlighter) then
|
||||||
coroutine.wrap(STHighlighter.process_response)(highlighter, response, c, version)
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if err then
|
||||||
|
highlighter.client_state[c.id].active_request = {}
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
coroutine.wrap(STHighlighter.process_response)(highlighter, response, c, version)
|
||||||
end, self.bufnr)
|
end, self.bufnr)
|
||||||
|
|
||||||
if success then
|
if success then
|
||||||
|
Reference in New Issue
Block a user