summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/gui.zig12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/gui/gui.zig b/src/gui/gui.zig
index 321c80b5..cac311e2 100644
--- a/src/gui/gui.zig
+++ b/src/gui/gui.zig
@@ -4057,15 +4057,13 @@ const Shell = struct {
host_io.commandEof(s.core, s.ptys, e.pane, s, closeWatched);
break :eof;
}
- // Unwatched, a command's exit is read here, as its end.
+ // Unwatched, a command's exit is read here, as its end,
+ // and a shell's, for a run waiting on it and the log.
const unwatched = if (s.core.panes[e.pane]) |pane| pane.command != null else false;
- var status: ?u8 = null;
- if (unwatched) {
- status = host_io.exitStatus(pt.pid, 100);
- if (status != null) pt.pid = 0; // reaped: no shell to retire
- }
+ const status = host_io.exitStatus(pt.pid, 100);
+ if (status != null) pt.pid = 0; // reaped: no shell to retire
s.closePty(e.pane);
- if (unwatched) s.core.update(.{ .exited = .{ .pane = e.pane, .status = status } });
+ if (unwatched or status != null) s.core.update(.{ .exited = .{ .pane = e.pane, .status = status } });
s.core.update(.{ .eof = .{ .pane = e.pane } });
}
s.saw_event = true;