diff options
author | Thiago de Arruda <tpadilha84@gmail.com> | 2015-08-21 13:10:34 -0300 |
---|---|---|
committer | Thiago de Arruda <tpadilha84@gmail.com> | 2015-08-21 13:28:53 -0300 |
commit | 3d2d44037f27104207005998d9bcb55af1152892 (patch) | |
tree | fd9cc6bd7e8a3eb4aa4f33226225efd660702e90 /src/nvim/terminal.c | |
parent | cb87670ff819161fb6ab70790d00ab87fc965aa7 (diff) | |
download | rneovim-3d2d44037f27104207005998d9bcb55af1152892.tar.gz rneovim-3d2d44037f27104207005998d9bcb55af1152892.tar.bz2 rneovim-3d2d44037f27104207005998d9bcb55af1152892.zip |
terminal: Only wipe buffer terminal_close wasn't called
After @250aca4f8938 it is possible that terminal_close will be called without
invoking the close_cb(which normally destroys the terminal structure). If this
happens, the terminal buffer will already be deleted so there's no need to call
`bwipeout!`.
Diffstat (limited to 'src/nvim/terminal.c')
-rw-r--r-- | src/nvim/terminal.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/nvim/terminal.c b/src/nvim/terminal.c index eb010bc190..931105717b 100644 --- a/src/nvim/terminal.c +++ b/src/nvim/terminal.c @@ -423,7 +423,9 @@ end: ui_busy_stop(); if (close) { term->opts.close_cb(term->opts.data); - do_cmdline_cmd("bwipeout!"); + if (term->buf) { + do_cmdline_cmd("bwipeout!"); + } } } |