termio: unconditionally show "process exited" message
We previously only showed this message if the user had `wait-after-command` set to true, since if its false the surface would close anyways. With the latest undo feature on macOS, this is no longer the case; a exited process can be undone and reopened. I considered disallowing undoing an exited surface, but I think there is value in being able to go back and recapture output in scrollback if you wanted to.pull/7556/head
parent
e25708fc43
commit
a87c68d49a
|
|
@ -418,12 +418,12 @@ fn processExitCommon(td: *termio.Termio.ThreadData, exit_code: u32) void {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// If we're purposely waiting then we just return since the process
|
|
||||||
// exited flag is set to true. This allows the terminal window to remain
|
|
||||||
// open.
|
|
||||||
if (execdata.wait_after_command) {
|
|
||||||
// We output a message so that the user knows whats going on and
|
// We output a message so that the user knows whats going on and
|
||||||
// doesn't think their terminal just froze.
|
// doesn't think their terminal just froze. We show this unconditionally
|
||||||
|
// on close even if `wait_after_command` is false and the surface closes
|
||||||
|
// immediately because if a user does an `undo` to restore a closed
|
||||||
|
// surface then they will see this message and know the process has
|
||||||
|
// completed.
|
||||||
terminal: {
|
terminal: {
|
||||||
td.renderer_state.mutex.lock();
|
td.renderer_state.mutex.lock();
|
||||||
defer td.renderer_state.mutex.unlock();
|
defer td.renderer_state.mutex.unlock();
|
||||||
|
|
@ -435,8 +435,10 @@ fn processExitCommon(td: *termio.Termio.ThreadData, exit_code: u32) void {
|
||||||
t.modes.set(.cursor_visible, false);
|
t.modes.set(.cursor_visible, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
return;
|
// If we're purposely waiting then we just return since the process
|
||||||
}
|
// exited flag is set to true. This allows the terminal window to remain
|
||||||
|
// open.
|
||||||
|
if (execdata.wait_after_command) return;
|
||||||
|
|
||||||
// Notify our surface we want to close
|
// Notify our surface we want to close
|
||||||
_ = td.surface_mailbox.push(.{
|
_ = td.surface_mailbox.push(.{
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue