0
0
mirror of https://github.com/vim/vim.git synced 2025-09-24 03:44:06 -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:
Bram Moolenaar
2020-06-26 19:44:06 +02:00
parent fc838d6cb0
commit cf8441704d
5 changed files with 32 additions and 2 deletions

View File

@@ -2461,7 +2461,7 @@ win_close(win_T *win, int free_buf)
return FAIL; // window is already being closed
if (win_unlisted(win))
{
emsg(_("E813: Cannot close autocmd or popup window"));
emsg(_(e_autocmd_close));
return FAIL;
}
if ((firstwin == aucmd_win || lastwin == aucmd_win) && one_window())