From e563be42a5b3e9243e2c01d34cf8e94d2047b753 Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Tue, 29 Sep 2026 00:45:33 -0300 Subject: A terminal's body reads as logical lines, the last one ending in a newline A terminal's body came back as the screen's rows, a long line cut where the terminal wrapped it and the last line with no newline. The body (and a terminal's Save, and the length its ctl reports) now joins wrapped rows by ghostty's wrap flags, as pty/run's output does, and ends the last line with a newline. Co-Authored-By: Claude Opus 5.5 --- src/fs.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/fs.zig') diff --git a/src/fs.zig b/src/fs.zig index 88ffb4a3..65e5d276 100644 --- a/src/fs.zig +++ b/src/fs.zig @@ -491,7 +491,7 @@ test "bounded reads release terminal snapshots after success and size refusal" { defer gpa.free(empty); try std.testing.expectEqual(@as(usize, 0), empty.len); p.update(.{ .output = .{ .pane = 0, .bytes = "limited terminal output" } }); - const expected = "limited terminal output"; + const expected = "limited terminal output\n"; // a line ends with its newline const bytes = try readLimit(p, path, expected.len); defer gpa.free(bytes); try std.testing.expectEqualStrings(expected, bytes); -- cgit v1.3