mirror of
https://github.com/vim/vim.git
synced 2025-09-25 03:54:15 -04:00
patch 8.2.4631: crash when switching window in BufWipeout autocommand
Problem: Crash when switching window in BufWipeout autocommand. Solution: Put any buffer in the window to avoid it being NULL. (closes #10024)
This commit is contained in:
@@ -708,6 +708,10 @@ aucmd_abort:
|
||||
*/
|
||||
if (wipe_buf)
|
||||
{
|
||||
// Do not wipe out the buffer if it is used in a window.
|
||||
if (buf->b_nwindows > 0)
|
||||
return FALSE;
|
||||
|
||||
if (action == DOBUF_WIPE_REUSE)
|
||||
{
|
||||
// we can re-use this buffer number, store it
|
||||
|
Reference in New Issue
Block a user