vim-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 vim/vim#11198, closes vim/vim#11197)
62de54b48d
This commit is contained in:
zeertzjq
2022-09-23 07:14:32 +08:00
parent 0760379b41
commit c28f00b101
3 changed files with 29 additions and 18 deletions

View File

@@ -4696,7 +4696,6 @@ void tabpage_close(int forceit)
void tabpage_close_other(tabpage_T *tp, int forceit)
{
int done = 0;
int h = tabline_height();
char prev_idx[NUMBUFLEN];
// Limit to 1000 windows, autocommands may add a window while we close
@@ -4712,11 +4711,6 @@ void tabpage_close_other(tabpage_T *tp, int forceit)
break;
}
}
redraw_tabline = true;
if (h != tabline_height()) {
win_new_screen_rows();
}
}
/// ":only".