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
|
end
|
||||||
|
|
||||||
if restrict_client_ids and #restrict_client_ids > 0 then
|
if restrict_client_ids and #restrict_client_ids > 0 then
|
||||||
client_ids = vim.tbl_filter(function(item)
|
local filtered_client_ids = {}
|
||||||
return vim.tbl_contains(restrict_client_ids, item)
|
for client_id in pairs(client_ids) do
|
||||||
end, vim.tbl_keys(client_ids))
|
if vim.tbl_contains(restrict_client_ids, client_id) then
|
||||||
|
filtered_client_ids[client_id] = true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
client_ids = filtered_client_ids
|
||||||
end
|
end
|
||||||
|
|
||||||
for client_id in pairs(client_ids) do
|
for client_id in pairs(client_ids) do
|
||||||
|
Loading…
Reference in New Issue
Block a user