mirror of
https://github.com/neovim/neovim.git
synced 2025-09-05 19:08:15 +00:00
fix(lsp): handle nil response in references request #35139
This commit is contained in:

committed by
GitHub

parent
22df649210
commit
26cc42e426
@@ -809,7 +809,7 @@ function M.references(context, opts)
|
||||
|
||||
for client_id, res in pairs(results) do
|
||||
local client = assert(lsp.get_client_by_id(client_id))
|
||||
local items = util.locations_to_items(res.result, client.offset_encoding)
|
||||
local items = util.locations_to_items(res.result or {}, client.offset_encoding)
|
||||
vim.list_extend(all_items, items)
|
||||
end
|
||||
|
||||
|
Reference in New Issue
Block a user