mirror of
https://github.com/neovim/neovim.git
synced 2025-09-23 03:28:33 +00: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:
@@ -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!");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user