mirror of
https://github.com/neovim/neovim.git
synced 2026-04-01 13:22:08 +00:00
fix(terminal): check buf before deleting extmark #38314
Problem: buffer could be null when trying to delete "[Process exited]" extmark Solution: delete extmark only if buffer exists
This commit is contained in:
@@ -680,7 +680,9 @@ void terminal_close(Terminal **termpp, int status)
|
||||
// only need to call the close callback to clean up the terminal object.
|
||||
only_destroy = true;
|
||||
// Buffer may be reused so delete the "[Process exited]" msg
|
||||
extmark_del_id(buf, (uint32_t)-1, term->exitmsg_id);
|
||||
if (buf) {
|
||||
extmark_del_id(buf, (uint32_t)-1, term->exitmsg_id);
|
||||
}
|
||||
} else {
|
||||
// flush any pending changes to the buffer
|
||||
if (!exiting) {
|
||||
|
||||
Reference in New Issue
Block a user