0
0
mirror of https://github.com/vim/vim.git synced 2025-10-03 05:14:07 -04:00

patch 9.0.0550: crash when closing a tabpage and buffer is NULL

Problem:    Crash when closing a tabpage and buffer is NULL.
Solution:   Adjust how autocommands are triggered when closing a window.
            (closes #11198, closes #11197)
This commit is contained in:
zeertzjq
2022-09-22 18:08:37 +01:00
committed by Bram Moolenaar
parent 5800c79838
commit 62de54b48d
4 changed files with 30 additions and 17 deletions

View File

@@ -6304,7 +6304,6 @@ tabpage_close_other(tabpage_T *tp, int forceit)
{
int done = 0;
win_T *wp;
int h = tabline_height();
// Limit to 1000 windows, autocommands may add a window while we close
// one. OK, so I'm paranoid...
@@ -6320,10 +6319,6 @@ tabpage_close_other(tabpage_T *tp, int forceit)
}
apply_autocmds(EVENT_TABCLOSED, NULL, NULL, FALSE, curbuf);
redraw_tabline = TRUE;
if (h != tabline_height())
shell_new_rows();
}
/*