From 42b68e5ea63c32ff9359f2268ef0d8c08eaafff2 Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Wed, 30 Sep 2026 19:28:12 -0300 Subject: Jumplist fills its one +Jumps again, as Recent does, never opening a second Each Jumplist opened another +Jumps below the asking pane, so a few clicks stacked stale copies of the list. Recent's refill of its own pane is now shared, and Jumplist uses it. Co-Authored-By: Claude Opus 5.5 --- src/ninep/ctl.zig | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'src/ninep/ctl.zig') diff --git a/src/ninep/ctl.zig b/src/ninep/ctl.zig index bc27f72b..4fab699a 100644 --- a/src/ninep/ctl.zig +++ b/src/ninep/ctl.zig @@ -2989,6 +2989,23 @@ test "a column takes panes until their documented minimums fill it, not until no } } +test "Jumplist fills its one +Jumps again, as Recent does, never a second" { + const p = try withFile(testing.allocator, "x\n"); + defer p.deinit(); + const serial = serialOf(p); + var count: [2]usize = undefined; + for (&count) |*n| { + try testing.expectEqual(Status.ok, wr(p, Node.of(serial, .exec), "Jumplist\n").reply.status); + p.sync(); + n.* = 0; + for (p.panes) |slot| if (slot) |pane| if (pane.file) |f| if (f.output) |o| { + n.* += @intFromBool(std.meta.eql(o.from, panes.Output.Origin{ .cmd = .Jumplist })); + }; + } + try testing.expectEqual(@as(usize, 1), count[0]); + try testing.expectEqual(@as(usize, 1), count[1]); +} + test "a Jumplist entry is (closed) only while no pane has its file open" { const p = try withFile(testing.allocator, "x\n"); defer p.deinit(); -- cgit v1.3