0
0
mirror of https://github.com/vim/vim.git synced 2025-09-23 03:43:49 -04:00

patch 8.2.4706: buffer remains active with WinClosed and tabpages

Problem:    Buffer remains active if a WinClosed event throws an exception
            when there are multiple tabpages.
Solution:   Ignore aborting() when closing the buffer. (closes #10101)
This commit is contained in:
zeertzjq
2022-04-07 14:08:29 +01:00
committed by Bram Moolenaar
parent 6d4e725a34
commit 6a06940f8a
3 changed files with 20 additions and 1 deletions

View File

@@ -2814,7 +2814,7 @@ win_close_othertab(win_T *win, int free_buf, tabpage_T *tp)
if (win->w_buffer != NULL)
// Close the link to the buffer.
close_buffer(win, win->w_buffer, free_buf ? DOBUF_UNLOAD : 0,
FALSE, FALSE);
FALSE, TRUE);
// Careful: Autocommands may have closed the tab page or made it the
// current tab page.