summaryrefslogtreecommitdiff
path: root/test/hxdiff.zig
diff options
context:
space:
mode:
Diffstat (limited to 'test/hxdiff.zig')
-rw-r--r--test/hxdiff.zig6
1 files changed, 5 insertions, 1 deletions
diff --git a/test/hxdiff.zig b/test/hxdiff.zig
index 03b135e2..85c854a0 100644
--- a/test/hxdiff.zig
+++ b/test/hxdiff.zig
@@ -404,13 +404,17 @@ fn runCase(arena: std.mem.Allocator, case: Case, pane_kind: []const u8) !Result
// leave tty mode the way a live session does: Ctrl-<tty_toggle>,
// then park the cursor at (0,0) — the helix harness's initial
// Selection::single(0,1) equivalent (a live exit would leave the
- // modal cursor tracking the shell cursor below the output)
+ // modal cursor tracking the shell cursor below the output) — and
+ // let the view follow it there, as it follows `gg`. Left at the
+ // live grid, the view would not show the cursor, which no session
+ // reaches, and zj or a page key would start from the grid's bottom.
core.update(.{ .key = .{ .cp = core.opts.tty_toggle, .ctrl = true } });
pump(core);
if (core.panes[core.view().active]) |pane| {
pane.body.cur_row = 0;
pane.body.cur_col = 0;
pane.body.cur_pinned = true;
+ pane.ensureCursorVisible();
}
} else fatal("case {s}: unknown pane {s}", .{ case.name, pane_kind });