mirror of
https://github.com/neovim/neovim.git
synced 2025-10-21 09:12:07 +00:00
LSP: Don't swallow bufnr argument from callbacks (#12350)
The callbacks for `textDocument/documentSymbol` and `workspace/symbol` never received the `bufnr` argument because the logic that adds error validation and logging swallowed the argument.
This commit is contained in:

committed by
GitHub

parent
c6dc397801
commit
044eb56ed2
@@ -242,12 +242,12 @@ end
|
|||||||
|
|
||||||
-- Add boilerplate error validation and logging for all of these.
|
-- Add boilerplate error validation and logging for all of these.
|
||||||
for k, fn in pairs(M) do
|
for k, fn in pairs(M) do
|
||||||
M[k] = function(err, method, params, client_id)
|
M[k] = function(err, method, params, client_id, bufnr)
|
||||||
local _ = log.debug() and log.debug('default_callback', method, { params = params, client_id = client_id, err = err })
|
log.debug('default_callback', method, { params = params, client_id = client_id, err = err, bufnr = bufnr })
|
||||||
if err then
|
if err then
|
||||||
error(tostring(err))
|
error(tostring(err))
|
||||||
end
|
end
|
||||||
return fn(err, method, params, client_id)
|
return fn(err, method, params, client_id, bufnr)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user