aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/vim
diff options
context:
space:
mode:
authorMaria José Solano <majosolano99@gmail.com>2025-08-02 22:58:58 -0400
committerGitHub <noreply@github.com>2025-08-02 19:58:58 -0700
commit26cc42e426d753ded12e6db83cd82ae8cd4610b6 (patch)
treeb413637bccfdd205684561542a68243cd4de7c6b /runtime/lua/vim
parent22df6492101f0163c0126dcdf2be01bd58ae7c28 (diff)
downloadrneovim-26cc42e426d753ded12e6db83cd82ae8cd4610b6.tar.gz
rneovim-26cc42e426d753ded12e6db83cd82ae8cd4610b6.tar.bz2
rneovim-26cc42e426d753ded12e6db83cd82ae8cd4610b6.zip
fix(lsp): handle nil response in references request #35139
Diffstat (limited to 'runtime/lua/vim')
-rw-r--r--runtime/lua/vim/lsp/buf.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/runtime/lua/vim/lsp/buf.lua b/runtime/lua/vim/lsp/buf.lua
index 4dfce3923b..2f8c1c02ac 100644
--- a/runtime/lua/vim/lsp/buf.lua
+++ b/runtime/lua/vim/lsp/buf.lua
@@ -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