mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
fix(lsp): check if buffer is valid before LspDetach autocmd (#29162)
This commit is contained in:
parent
43581011e4
commit
230bc34ca5
@ -393,7 +393,7 @@ local function on_client_exit(code, signal, client_id)
|
||||
|
||||
vim.schedule(function()
|
||||
for bufnr in pairs(client.attached_buffers) do
|
||||
if client and client.attached_buffers[bufnr] then
|
||||
if client and client.attached_buffers[bufnr] and api.nvim_buf_is_valid(bufnr) then
|
||||
api.nvim_exec_autocmds('LspDetach', {
|
||||
buffer = bufnr,
|
||||
modeline = false,
|
||||
|
Loading…
Reference in New Issue
Block a user