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,7 +423,9 @@ end:
|
|||||||
ui_busy_stop();
|
ui_busy_stop();
|
||||||
if (close) {
|
if (close) {
|
||||||
term->opts.close_cb(term->opts.data);
|
term->opts.close_cb(term->opts.data);
|
||||||
do_cmdline_cmd("bwipeout!");
|
if (term->buf) {
|
||||||
|
do_cmdline_cmd("bwipeout!");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user