summaryrefslogtreecommitdiff
path: root/src/tagline.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-10-01 10:07:05 -0300
committerGabriel Schneider <[email protected]>2026-10-01 10:36:27 -0300
commit1f2653d96656ab55956b5798bf637372ce337e29 (patch)
tree61010e2bb73534a34f6f8bd0398d1b740153fc7f /src/tagline.zig
parent3aa24c27c62c740cd7647831d0a14a9b180992da (diff)
downloadpardes-1f2653d96656ab55956b5798bf637372ce337e29.tar.gz
pardes-1f2653d96656ab55956b5798bf637372ce337e29.zip
A bound REPL whose program exited is skipped, as the docs say: out of the question, the running one taking the text, and a done command REPL's tag says no id
Two bound REPLs always asked, an exited one offered and, chosen, sent nothing. Now an exited one is left out: one still running takes the text with no question, none running is said (`no program running`), and nothing runs as a command. A command pane bound as a REPL whose command is done no longer shows its id in the tag. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Diffstat (limited to 'src/tagline.zig')
-rw-r--r--src/tagline.zig5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/tagline.zig b/src/tagline.zig
index 032fb5a0..5a9e2346 100644
--- a/src/tagline.zig
+++ b/src/tagline.zig
@@ -116,8 +116,9 @@ pub fn pathPrefix(arena: std.mem.Allocator, pane: *Pane) ![]const u8 {
if (pane.command_status) |n| return std.fmt.allocPrint(arena, "{s} ({s}{s}) exit {d}{s}{s}", .{ (try shownDir(arena, pane)), shown, more, n, gap, id });
return std.fmt.allocPrint(arena, "{s} ({s}{s}) exit ?{s}{s}", .{ (try shownDir(arena, pane)), shown, more, gap, id });
}
- // A bound REPL says what it is bound as, beside its Tty word.
- if (pane.repl != null) {
+ // A bound REPL says what it is bound as, beside its Tty word, while its
+ // program runs: a command REPL whose command exited says no id.
+ if (pane.repl != null and !(pane.command != null and pane.command_done)) {
var idbuf: [48]u8 = undefined;
return std.fmt.allocPrint(arena, "{s} {s}", .{ (try shownDir(arena, pane)), exec.replId(&idbuf, pane) });
}