summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-11-08 22:05:53 -0300
committerGabriel Schneider <[email protected]>2026-11-08 22:06:02 -0300
commit4c4fce7373ea72b10e8d9bb7aa3c91c3d5bbf0f5 (patch)
treec2302732b603580585b6f069bee876d47e6720f9
parenta3e07c437ed6f94f2eda5cfb5e50d2728a747aad (diff)
downloadpardes-4c4fce7373ea72b10e8d9bb7aa3c91c3d5bbf0f5.tar.gz
pardes-4c4fce7373ea72b10e8d9bb7aa3c91c3d5bbf0f5.zip
helix: the page-scroll mismatches were the view's height, not a rule: pardes's scroll (Text.scrollViewMove, halfPageMove, gotoWindow) is helix's commands.rs scroll/page_* rule for rule, but hxdiff ran pardes at 80x24, where its chrome leaves the pane 21 rows to helix's 22 (half page 10 to 11, page 21 to 22); the harness runs the core at 80x25 so the pane is helix's 22 and refuses a case whose pane is not, and helix-keys.md says why: hxdiff's twelve page-scroll cases and gb-after-zz pass (16 to 3), hxparity's five page waivers match again (5 to 0)
Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge
-rw-r--r--docs/helix-keys.md5
-rw-r--r--test/hxdiff.zig12
2 files changed, 15 insertions, 2 deletions
diff --git a/docs/helix-keys.md b/docs/helix-keys.md
index 4e543bbb..f517a7a8 100644
--- a/docs/helix-keys.md
+++ b/docs/helix-keys.md
@@ -442,7 +442,10 @@ Files (all in `test/hxcases/`):
no script. Either wire it up or delete it.
The pardes half is `test/hxdiff.zig`, which builds `pardes-hxdiff` and drives
-the core headlessly at 80x24 (22 body rows, matching helix's 22 text rows).
+the core headlessly at 80x25: helix's harness runs at 80x24, whose one view
+is 22 text rows, and pardes's chrome takes a row more, so its pane gets the
+same 22. Every page key, half page, `zz` and `gb` counts in those rows, so
+the harness refuses to run a case whose pane shows any other number.
Run it:
diff --git a/test/hxdiff.zig b/test/hxdiff.zig
index 85c854a0..7c72475f 100644
--- a/test/hxdiff.zig
+++ b/test/hxdiff.zig
@@ -376,12 +376,19 @@ test "differential reports compare values and report every changed field" {
try std.testing.checkAllAllocationFailures(allocator, Check.run, .{ want, changed });
}
+/// The text rows of hx-harness's one view (80x24 less its two lines).
+const helix_view_rows = 22;
+
fn runCase(arena: std.mem.Allocator, case: Case, pane_kind: []const u8) !Result {
// fresh core per case: the tty_only boot — one shell pane, tty mode, no
// greeting. Live-session contract: sizes arrive as the first resize event.
const core = try pardes.Pardes.init(gpa, .{ .tty_only = true });
defer core.deinit();
- core.update(.{ .resize = .{ .cols = 80, .rows = 24 } });
+ // helix's harness runs at 80x24, a view of 22 text rows under its
+ // status and command lines; pardes's chrome takes a row more, so 25
+ // rows give its pane the same 22 that every page, half page and gb
+ // counts in
+ core.update(.{ .resize = .{ .cols = 80, .rows = 25 } });
pump(core);
if (std.mem.eql(u8, pane_kind, "file")) {
@@ -418,6 +425,9 @@ fn runCase(arena: std.mem.Allocator, case: Case, pane_kind: []const u8) !Result
}
} else fatal("case {s}: unknown pane {s}", .{ case.name, pane_kind });
+ const shown = core.panes[core.view().active] orelse return error.NoActivePane;
+ if (shown.rows != helix_view_rows) fatal("case {s}: the pane shows {d} rows, not helix's {d}: resize the core to match", .{ case.name, shown.rows, helix_view_rows });
+
// keys: helix notation — printables verbatim, <...> specials
var ki: usize = 0;
while (ki < case.keys.len) {