0
0
mirror of https://github.com/vim/vim.git synced 2025-09-23 03:43:49 -04:00

patch 8.1.1566: error message when terminal closes in another tab

Problem:    Error message when terminal closes while it is not in the current
            tab.
Solution:   Also set "do_set_w_closing" when using the special autocommand
            window. (closes #4552)
This commit is contained in:
Bram Moolenaar
2019-06-17 22:40:41 +02:00
parent 9b283523f2
commit 517f71ab17
2 changed files with 4 additions and 0 deletions

View File

@@ -3019,6 +3019,8 @@ term_after_channel_closed(term_T *term)
ch_log(NULL, "terminal job finished, closing window");
aucmd_prepbuf(&aco, term->tl_buffer);
// Avoid closing the window if we temporarily use it.
if (curwin == aucmd_win)
do_set_w_closing = TRUE;
if (do_set_w_closing)
curwin->w_closing = TRUE;
do_bufdel(DOBUF_WIPE, (char_u *)"", 1, fnum, fnum, FALSE);