diff options
Diffstat (limited to 'src/pardes.zig')
| -rw-r--r-- | src/pardes.zig | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/pardes.zig b/src/pardes.zig index 26c9246a..35b44871 100644 --- a/src/pardes.zig +++ b/src/pardes.zig @@ -5023,6 +5023,7 @@ pub const Pardes = struct { if (id < MAX_PANES) if (p.panes[id]) |pane| { ctlfs.pty.shellGone(p, pane, true); // a respawn replaced whatever ran pane.shell_failed = false; + pane.had_shell = true; pane.fs.unmarked = !prompt_marks; // The tag's Tty word names the shell the host ran, and a click // on it (`Tty+fish`) opens another of the same. @@ -5266,6 +5267,11 @@ pub const Pardes = struct { if (pane.command != null and !pane.command_done) { pane.command_pty = false; exec.commandDone(p, id, 127); + } else if (pane.command == null and !pane.had_shell) { + // A Tty whose shell never ran: no dead pane left behind; the + // write that asked for it has failed with why. A terminal whose + // shell was started again (pty/ctl exec) keeps its pane. + p.unplaced.set(id); } } |
