mirror of
https://github.com/zoriya/jj.nvim.git
synced 2026-08-05 18:56:13 +00:00
When closing a terminal buffer (floating or regular), a race condition could occur where the BufWipeout/BufDelete autocmd clears the buffer reference, but the job's on_exit handler later tries to operate on it via vim.schedule. This caused 'Invalid buffer' errors. Add validity checks in both floating and regular buffer on_exit handlers to safely handle the case where the buffer has already been cleaned up.