diff options
| author | Gabriel Schneider <[email protected]> | 2026-09-29 12:43:17 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-10-01 00:12:16 -0300 |
| commit | a98fca4546e5b99de07193297bac04abc85ab4ad (patch) | |
| tree | 9ed032442f6d767b2ea1104e06a62c3a4b7b3965 /src/pardes.zig | |
| parent | 137adecd03be209901efb228d9288282bc36c8de (diff) | |
| download | pardes-a98fca4546e5b99de07193297bac04abc85ab4ad.tar.gz pardes-a98fca4546e5b99de07193297bac04abc85ab4ad.zip | |
A Jumplist entry is (closed) only while no pane has its file open
A closed file's entries stayed closed after the file was opened again another way (a look, Recent), so Jumplist said (closed) of an open file and a step onto it reopened it. They are now that pane's as soon as a pane shows the file.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Diffstat (limited to 'src/pardes.zig')
| -rw-r--r-- | src/pardes.zig | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/pardes.zig b/src/pardes.zig index 2649014a..1f136f2b 100644 --- a/src/pardes.zig +++ b/src/pardes.zig @@ -6806,6 +6806,14 @@ pub const Pardes = struct { if (!live) { if (j.path_hash == 0 or p.recentByHash(j.path_hash) == null) continue; kept.serial = 0; + // Open again in some pane (a look, Recent): the entry is that + // pane's, and closed only while no pane has the file. + for (p.panes, 0..) |slot, id| if (slot) |pane| if (recentDot(pane)) |d| { + if (std.hash.Wyhash.hash(0, d.path) != j.path_hash) continue; + kept.pane = @intCast(id); + kept.serial = pane.serial; + break; + }; } p.jumps[w] = kept; w += 1; |
