fix(lsp): correct iteration through attached buffers (#36517)

This commit is contained in:
Maria Solano
2025-11-10 19:54:01 -08:00
committed by GitHub
parent 7fe02126f9
commit 2822c38f2e
3 changed files with 3 additions and 3 deletions

View File

@@ -117,7 +117,7 @@ function M.on_refresh(err, _, ctx)
if err then
return vim.NIL
end
for bufnr in ipairs(vim.lsp.get_client_by_id(ctx.client_id).attached_buffers or {}) do
for bufnr in pairs(vim.lsp.get_client_by_id(ctx.client_id).attached_buffers or {}) do
for _, winid in ipairs(api.nvim_list_wins()) do
if api.nvim_win_get_buf(winid) == bufnr then
if bufstates[bufnr] and bufstates[bufnr].enabled then