mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
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!`.
This commit is contained in:
parent
cb87670ff8
commit
3d2d44037f
@ -423,9 +423,11 @@ end:
|
||||
ui_busy_stop();
|
||||
if (close) {
|
||||
term->opts.close_cb(term->opts.data);
|
||||
if (term->buf) {
|
||||
do_cmdline_cmd("bwipeout!");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void terminal_destroy(Terminal *term)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user