mirror of
https://github.com/neovim/neovim.git
synced 2025-09-06 03:18:16 +00:00
fix(lsp): handle nil
buffer state in documentColor
clear (#33746)
This commit is contained in:

committed by
GitHub

parent
d1fed989f2
commit
abc96ba0ce
@@ -157,7 +157,11 @@ end
|
|||||||
|
|
||||||
--- @param bufnr integer
|
--- @param bufnr integer
|
||||||
local function buf_clear(bufnr)
|
local function buf_clear(bufnr)
|
||||||
local bufstate = assert(bufstates[bufnr])
|
local bufstate = bufstates[bufnr]
|
||||||
|
if not bufstate then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
local client_ids = vim.tbl_keys(bufstate.hl_info) --- @type integer[]
|
local client_ids = vim.tbl_keys(bufstate.hl_info) --- @type integer[]
|
||||||
|
|
||||||
for _, client_id in ipairs(client_ids) do
|
for _, client_id in ipairs(client_ids) do
|
||||||
|
Reference in New Issue
Block a user