summaryrefslogtreecommitdiff
path: root/src/pardes.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-09-28 15:39:33 -0300
committerGabriel Schneider <[email protected]>2026-10-01 00:12:15 -0300
commit28a055dcee3423e8cf181b5e46c889d3cd522017 (patch)
tree4938d340159e5f8e0fad2e82b83febe85b56bd2d /src/pardes.zig
parentf2091c52e06b0935f69914ac2d76941361cbb969 (diff)
downloadpardes-28a055dcee3423e8cf181b5e46c889d3cd522017.tar.gz
pardes-28a055dcee3423e8cf181b5e46c889d3cd522017.zip
The log's run record carries the whole command line, after the new record of its pane
run logged the line's first word only, and before the new record of the pane it ran in, since panes are announced at the end of a step. It now carries the whole line as msg carries its text (control characters, newlines too, as spaces), and announces the new pane first. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Diffstat (limited to 'src/pardes.zig')
-rw-r--r--src/pardes.zig5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/pardes.zig b/src/pardes.zig
index 5e86f0fd..58354b95 100644
--- a/src/pardes.zig
+++ b/src/pardes.zig
@@ -1593,7 +1593,10 @@ test "a command pane shows how its command ended, and the next command there run
const log = try ctlfs.events.freezeLog(p);
defer gpa.free(log.bytes);
var want: [64]u8 = undefined;
- try std.testing.expect(std.mem.indexOf(u8, log.bytes, try std.fmt.bufPrint(&want, "run {d} make\n", .{pane.serial})) != null);
+ // The whole line, after the `new` of the pane it runs in.
+ const ran = std.mem.indexOf(u8, log.bytes, try std.fmt.bufPrint(&want, "run {d} make -j8\n", .{pane.serial})) orelse return error.NoRunRecord;
+ const made = std.mem.indexOf(u8, log.bytes, try std.fmt.bufPrint(&want, "new {d} ", .{pane.serial})) orelse return error.NoNewRecord;
+ try std.testing.expect(made < ran);
try std.testing.expect(std.mem.indexOf(u8, log.bytes, try std.fmt.bufPrint(&want, "exit {d} 2\n", .{pane.serial})) != null);
// A signal for a pane is not performed on whoever takes its slot.
const Count = struct {