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.
diff --git a/src/window.c b/src/window.c
index 095eabe..e2adc0c 100644
--- a/src/window.c
+++ b/src/window.c
@@ -2461,7 +2461,7 @@
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())