forked from aniani/vim
patch 8.2.0371: crash with combination of terminal popup and autocmd
Problem: Crash with combination of terminal popup and autocmd. Solution: Disallow closing a popup that is the current window. Add a check that the current buffer is valid. (closes #5754)
This commit is contained in:
@@ -382,6 +382,7 @@ term_close_buffer(buf_T *buf, buf_T *old_curbuf)
|
||||
curwin->w_buffer = curbuf;
|
||||
++curbuf->b_nwindows;
|
||||
}
|
||||
CHECK_CURBUF;
|
||||
|
||||
// Wiping out the buffer will also close the window and call
|
||||
// free_terminal().
|
||||
|
Reference in New Issue
Block a user