mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
fix(lsp): maintain client_ids table structure when filtering (#15991)
This commit is contained in:
parent
d288daac2b
commit
ee342d3cef
@ -144,9 +144,13 @@ local function for_each_buffer_client(bufnr, fn, restrict_client_ids)
|
||||
end
|
||||
|
||||
if restrict_client_ids and #restrict_client_ids > 0 then
|
||||
client_ids = vim.tbl_filter(function(item)
|
||||
return vim.tbl_contains(restrict_client_ids, item)
|
||||
end, vim.tbl_keys(client_ids))
|
||||
local filtered_client_ids = {}
|
||||
for client_id in pairs(client_ids) do
|
||||
if vim.tbl_contains(restrict_client_ids, client_id) then
|
||||
filtered_client_ids[client_id] = true
|
||||
end
|
||||
end
|
||||
client_ids = filtered_client_ids
|
||||
end
|
||||
|
||||
for client_id in pairs(client_ids) do
|
||||
|
Loading…
Reference in New Issue
Block a user