summaryrefslogtreecommitdiff
path: root/test/panes.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-11-22 20:21:32 -0300
committerGabriel Schneider <[email protected]>2026-11-22 20:21:32 -0300
commit3f250d0f963f375d699f11ffc02b07f2e2cbbbee (patch)
tree4e5a1f577fd3dd247f3643d979868347524ce703 /test/panes.zig
parent34e2d82a322bd3767a8ec62b3a4c0894399e8c04 (diff)
parentc607dc14502a6956bdfa3575bc7363514a7abeb4 (diff)
downloadpardes-3f250d0f963f375d699f11ffc02b07f2e2cbbbee.tar.gz
pardes-3f250d0f963f375d699f11ffc02b07f2e2cbbbee.zip
integration (a base for the terminals' next round, not yet the gathered line): the viewport in the view and the patches in the semantics hash on merge58 with the terminal put back: pardes-raw-tty (`muwnrqro`, on pardes-merge58: a TERM that reaches a session while it leaves its terminal no longer leaves it raw: `Killed.disarm` puts the cooked modes back itself, `leave` calls it last) and pardes-term-join-10's two changes (`xktusoyq` on `qtxssxyk`, on pardes-term-join-9: where a view stands in a terminal's history is the view's (`Pane.scrolled_to`), carried once a confirmed write that moves rows, the wire at 31; build/patches hashed into a replica's semantics); no conflict; core-test 917/1077 (160 skipped), shell-test 1119/1122, pane-test 182/183, term-test 16/16; NOT gated whole: the viewport's gate had one perf count over its budget ("terminal on all" +0.235%), which the next round brings down before this is the gathered line (2026-11-22)
Co-Authored-By: Claude Fable 5.2 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T
Diffstat (limited to 'test/panes.zig')
-rw-r--r--test/panes.zig14
1 files changed, 7 insertions, 7 deletions
diff --git a/test/panes.zig b/test/panes.zig
index 7d0b6396..88209693 100644
--- a/test/panes.zig
+++ b/test/panes.zig
@@ -965,7 +965,7 @@ test "terminal overlay recoloring never materializes unrelated history" {
_ = try p.render(frame.allocator());
try testing.expect(p.shell_rows.pane == null);
- pane.ovl.?.row = @intCast(pardes.Term.grid(pane.terminal).offset);
+ pane.ovl.?.row = @intCast(pane.termTop());
p.gpa.free(pane.ovl.?.text);
pane.ovl.?.text = try p.gpa.dupe(u8, "caf\xc3\xa9 \xe7\x95\x8c");
_ = frame.reset(.retain_capacity);
@@ -994,8 +994,8 @@ test "terminal output keeps following new rows after scrollback eviction" {
for (0..3) |phase| {
if (phase > 0) {
pane.body.mode = .normal;
- pardes.Term.scroll(pane.terminal.?, -30);
- try std.testing.expect(pages.scrollbar().offset < pages.scrollbar().total - pane.rows);
+ pane.scrollBy(-30);
+ try std.testing.expect(pane.termTop() < pages.scrollbar().total - pane.rows);
pardes.keys.enterTty(p, 0);
}
for (phase * 20_000..(phase + 1) * 20_000) |n| {
@@ -1008,7 +1008,7 @@ test "terminal output keeps following new rows after scrollback eviction" {
try std.testing.expect(evictions > phase);
try std.testing.expect(pages.page_size <= pages.limits.max(.bytes));
const sb = pages.scrollbar();
- try std.testing.expectEqual(sb.total - pane.rows, sb.offset);
+ try std.testing.expectEqual(sb.total - pane.rows, pane.termTop());
const full = try pardes.Term.scrollback(pane.terminal, gpa);
defer gpa.free(full);
var last_buf: [16]u8 = undefined;
@@ -2686,14 +2686,14 @@ const TerminalTests = struct {
p.update(.{ .output = .{ .pane = .at(0), .bytes = bytes } });
}
p.shell_rows.stale = true;
- pardes.Term.scroll(pane.terminal.?, -20);
+ pane.scrollBy(-20);
// ONE buffer line standing in for SIX shell rows: everything below slides
// UP five, so the last rows of the body resolve past the viewport's bottom
// edge. `PageList.pin` answers for those rows anyway — it walks down the
// pagelist, not the viewport — so without a bound of its own this pass
// painted the scrollback's colours onto rows the text pass left blank.
- const anchor: i32 = @intCast(pardes.Term.grid(pane.terminal).offset);
+ const anchor: i32 = @intCast(pane.termTop());
pane.ovl = .{ .row = anchor, .rows = 6, .text = try p.gpa.dupe(u8, "one") };
p.shell_rows.stale = true;
@@ -2958,7 +2958,7 @@ const TerminalTests = struct {
// a buffer whose covered span STRADDLES the viewport top is an ordinary
// state. tty mode does not apply the buffer, so it must not be moved by one
// either — and `surfRow`/`gridRow` are not inverses across that span.
- const anchor: i32 = @intCast(pardes.Term.grid(pane.terminal).offset);
+ const anchor: i32 = @intCast(pane.termTop());
pane.ovl = .{ .row = anchor - 1, .rows = 4, .text = try p.gpa.dupe(u8, "one\ntwo") };
p.shell_rows.stale = true;
_ = frame.reset(.retain_capacity);