summaryrefslogtreecommitdiff
path: root/src/ninep
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-09-29 08:04:16 -0300
committerGabriel Schneider <[email protected]>2026-10-01 00:12:16 -0300
commitaa1d8a848585dcc1b3f1775e0b98435824f28e7d (patch)
tree3a1a6061b927601dcb7220f7d368b0eb37c8b02d /src/ninep
parent0ec8d0dc6217486446f2fe2156dff136173a4ef5 (diff)
downloadpardes-aa1d8a848585dcc1b3f1775e0b98435824f28e7d.tar.gz
pardes-aa1d8a848585dcc1b3f1775e0b98435824f28e7d.zip
`@p<terminal>:N` past the terminal's last line is a miss, as in a file
The line-past-end check read only a file pane's lines, so a terminal's look went nowhere and said nothing. A terminal's lines are its logical lines, as a +Search of it lists them. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Diffstat (limited to 'src/ninep')
-rw-r--r--src/ninep/ctl.zig6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/ninep/ctl.zig b/src/ninep/ctl.zig
index 9bb9c044..58fcdf3a 100644
--- a/src/ninep/ctl.zig
+++ b/src/ninep/ctl.zig
@@ -2134,4 +2134,10 @@ test "@p<terminal>:<address> takes any address over the terminal's lines, select
try testing.expectEqual(@as(i32, 1), pane.body.cur_col);
_ = wr(p, root, try std.fmt.bufPrint(&line, "@p{d}:/zzqq/\n", .{serial}));
try testing.expect(th.logHas(p, "look: no match for regexp"));
+ // A line past its last is a miss, as in a file.
+ const row_before = pane.body.cur_row;
+ _ = wr(p, root, try std.fmt.bufPrint(&line, "@p{d}:999\n", .{serial}));
+ try testing.expect(th.logHas(p, "has no line 999"));
+ try testing.expectEqual(row_before, pane.body.cur_row);
+ try testing.expectEqualStrings("", rd(p, root, 0, 64).bytes);
}