terminal: refresh before on_exit. #5217

References #3030
References https://github.com/radenling/vim-dispatch-neovim/issues/6

The terminal is updated by a timer, but on_exit needs the final state.
Before this change, on_exit callback could see a stale terminal buffer.

Helped-by: oni-link <knil.ino@gmail.com>
This commit is contained in:
Richard Adenling
2016-08-06 13:23:52 +02:00
committed by Justin M. Keyes
parent a9605bb4af
commit a6f74debc0
2 changed files with 10 additions and 2 deletions

View File

@@ -449,7 +449,7 @@ void close_buffer(win_T *win, buf_T *buf, int action, int abort_if_last)
if (buf->terminal) {
terminal_close(buf->terminal, NULL);
}
}
/* Always remove the buffer when there is no file name. */
if (buf->b_ffname == NULL)