mirror of
https://github.com/vim/vim.git
synced 2025-09-25 03:54:15 -04:00
patch 8.2.1059: crash when using :tabonly in an autocommand
Problem: Crash when using :tabonly in an autocommand. (Yegappan Lakshmanan) Solution: Do not allow the autocommand window to be closed.
This commit is contained in:
@@ -5178,6 +5178,13 @@ ex_win_close(
|
||||
int need_hide;
|
||||
buf_T *buf = win->w_buffer;
|
||||
|
||||
// Never close the autocommand window.
|
||||
if (win == aucmd_win)
|
||||
{
|
||||
emsg(_(e_autocmd_close));
|
||||
return;
|
||||
}
|
||||
|
||||
need_hide = (bufIsChanged(buf) && buf->b_nwindows <= 1);
|
||||
if (need_hide && !buf_hide(buf) && !forceit)
|
||||
{
|
||||
|
Reference in New Issue
Block a user