mirror of
https://github.com/neovim/neovim.git
synced 2024-12-23 20:55:18 -07:00
fix(lsp): check if inlay hints are enabled for a buffer before disabling (#24074)
disabling before enabling throws an error otherwise, because bufstate[bufnr] doesn't exist
This commit is contained in:
parent
64f2691a98
commit
d3e0352574
@ -207,9 +207,11 @@ end
|
||||
---@private
|
||||
function M.disable(bufnr)
|
||||
bufnr = resolve_bufnr(bufnr)
|
||||
if bufstates[bufnr] and bufstates[bufnr].enabled then
|
||||
clear(bufnr)
|
||||
bufstates[bufnr].enabled = nil
|
||||
bufstates[bufnr].timer = nil
|
||||
end
|
||||
end
|
||||
|
||||
--- Toggle inlay hints for a buffer
|
||||
|
Loading…
Reference in New Issue
Block a user