From bdc7084e2a1480272eda770a4e20bb9783c860d3 Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Tue, 24 Nov 2026 19:35:47 -0300 Subject: walk (pick-ui SPEC ยง6.6, item 6 of the Walk UI line B): `Jumps new-pane`, the default (item 1 made the setting: a Settings choice, `Jumps walk` in a tag or an init line, reported by DumpConfig), jumps exactly as before the walk: look.open runs the new-pane code it always ran, nothing reads (no Keep, no tint) and no trail is made; TEST FIRST: Trail.zig "Jumps new-pane jumps as before the walk: a new pane for a file no pane shows, under the asking one, the one showing it focused, nothing stepped"; docs/typ/builtins-gui.json refreshed for Keep and Jumps, and the builtins process golden (its Look row 4 lines down); on the stack: shell-test 1214/1217, term-test 17/17, kitty-test 45/45, behaviour-test --replay 277/277, process-test 146 less the builtins golden refreshed here, the soak (5 clients) diverged 0 unequal 0 quiet checks 595/0 corpus 22/22, the gate against tree7: unit-test 1809/1813 (no failure the base has not), frame 76 and the 8 deep-sel counts differ as main's own gate merge70-g does (load 5-9) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 5.5 --- core/Trail.zig | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) (limited to 'core/Trail.zig') diff --git a/core/Trail.zig b/core/Trail.zig index 7166d810..69f149df 100644 --- a/core/Trail.zig +++ b/core/Trail.zig @@ -660,3 +660,31 @@ test "closing a held pane closes its reader; a kept reader stays; typed into, a try std.testing.expect(p.paneBySerial(fresh_serial) == null); try std.testing.expect(p.panes[r] != null); } + +test "Jumps new-pane jumps as before the walk: a new pane for a file no pane shows, under the asking one, the one showing it focused, nothing stepped" { + var f: Fixture = .{ .p = undefined, .tmp = undefined }; + try f.init(60); + defer f.deinit(); + const p = f.p; + p.settings.jumps = .@"new-pane"; + var at: [64]u8 = undefined; + var open: usize = 0; + for (p.panes) |slot| open += @intFromBool(slot != null); + // From the held pane and from the reading one: a new pane each time. + f.look(f.held, "rank.zig", 12); + const rank = p.view().active; + try std.testing.expectEqualStrings("rank.zig:12", f.at(&at)); + f.look(rank, "place.zig", 8); + try std.testing.expect(p.view().active != rank and p.panes[rank] != null); + try std.testing.expectEqualStrings("place.zig:8", f.at(&at)); + // A file a pane shows: that pane, focused; nothing new, no walk. + f.look(p.view().active, "rank.zig", 30); + try std.testing.expectEqual(rank, p.view().active); + try std.testing.expectEqualStrings("rank.zig:30", f.at(&at)); + var now: usize = 0; + for (p.panes) |slot| if (slot) |pane| { + now += 1; + try std.testing.expectEqual(@as(u8, 0), pane.trail.n); + }; + try std.testing.expectEqual(open + 2, now); +} -- cgit v1.3