mirror of
https://github.com/neovim/neovim.git
synced 2026-10-26 15:40:20 -05:00
fix(lsp): check for non-nil buffer state on reset (#36519)
This commit is contained in:
1 parent
3606b74d24
commit
1bc85d29c1
1 file changed
+3
@@ -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