mirror of
https://github.com/neovim/neovim.git
synced 2025-09-20 02:08:17 +00:00
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:
@@ -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) {
|
||||
|
Reference in New Issue
Block a user