fix(lsp): avoid assertion when client_hints do not exist (#28461)

This commit is contained in:
Yi Ming 2024-04-23 02:18:49 +08:00 committed by GitHub
parent ea1c9f60e0
commit 39fc340276
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -311,6 +311,10 @@ api.nvim_set_decoration_provider(namespace, {
if bufstate.version ~= util.buf_versions[bufnr] then if bufstate.version ~= util.buf_versions[bufnr] then
return return
end end
if not bufstate.client_hints then
return
end
local hints_by_client = assert(bufstate.client_hints) local hints_by_client = assert(bufstate.client_hints)
for lnum = topline, botline do for lnum = topline, botline do