mirror of
https://github.com/neovim/neovim.git
synced 2025-11-15 06:49:01 +00:00
fix(lsp): check for non-nil buffer state on reset (#36519)
This commit is contained in:
@@ -199,6 +199,9 @@ function M.reset_buf(client, bufnr)
|
||||
end
|
||||
assert(state.buffers, 'CTGroupState must have buffers')
|
||||
local buf_state = state.buffers[bufnr]
|
||||
if not buf_state then
|
||||
return
|
||||
end
|
||||
buf_state.refs = buf_state.refs - 1
|
||||
assert(buf_state.refs >= 0, 'refcount on buffer state must not get negative')
|
||||
if buf_state.refs == 0 then
|
||||
|
||||
Reference in New Issue
Block a user