mirror of
https://github.com/neovim/neovim
synced 2025-07-16 01:01:49 +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
|
||||
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[]
|
||||
|
||||
for _, client_id in ipairs(client_ids) do
|
||||
|
Reference in New Issue
Block a user