vim-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.
cf8441704d

E813 error message does not mention 'popup' window
because Neovim floating window are regular windows, unlike Vim popups.

https://github.com/neovim/neovim/pull/14532#discussion_r631731829
This commit is contained in:
Jan Edmund Lazo
2021-05-11 21:20:32 -04:00
parent 7339290900
commit f54a938271
4 changed files with 29 additions and 1 deletions

View File

@@ -6520,6 +6520,12 @@ 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) {
if ((p_confirm || cmdmod.confirm) && p_write) {