diff options
author | Bram Moolenaar <Bram@vim.org> | 2020-06-26 19:44:06 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2020-06-26 19:44:06 +0200 |
commit | cf8441704d6e517bda1899f4afa82c6b4eecbaec (patch) | |
tree | 426b55ece4b23b41dfdbade5c64aeaafe3db8693 /src/ex_docmd.c | |
parent | fc838d6cb0f22c77a6ee2befd034b593e1c5ea06 (diff) |
patch 8.2.1059: crash when using :tabonly in an autocommandv8.2.1059
Problem: Crash when using :tabonly in an autocommand. (Yegappan Lakshmanan)
Solution: Do not allow the autocommand window to be closed.
Diffstat (limited to 'src/ex_docmd.c')
-rw-r--r-- | src/ex_docmd.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/ex_docmd.c b/src/ex_docmd.c index 6c887fae1c..2469df341c 100644 --- a/src/ex_docmd.c +++ b/src/ex_docmd.c @@ -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) { |