diff options
| author | Gabriel Schneider <[email protected]> | 2026-09-30 20:09:32 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-10-01 00:12:17 -0300 |
| commit | f8fe738416fe3a40a7136f2cb5528e8fd57f40df (patch) | |
| tree | 4f5f3ff990d79523a191c0754a154f3f5ffdee43 /src/ninep/events.zig | |
| parent | 506ca99f13aec67d593e4a30bbe416dea176d0ba (diff) | |
| download | pardes-f8fe738416fe3a40a7136f2cb5528e8fd57f40df.tar.gz pardes-f8fe738416fe3a40a7136f2cb5528e8fd57f40df.zip | |
Recent and /recent keep PDFs and images as they keep files, and an open file's row is where its dot is now
Only text files were recorded, so a PDF read yesterday was not there to
find again, and an open file's row showed the place it last closed at,
stale by however far it had moved since. A PDF is kept at its page and
reopened there from its row; an image by its path; an open one's row
reads its pane's place at the time of the listing.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Diffstat (limited to 'src/ninep/events.zig')
| -rw-r--r-- | src/ninep/events.zig | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/ninep/events.zig b/src/ninep/events.zig index a09f7278..bacf3ad6 100644 --- a/src/ninep/events.zig +++ b/src/ninep/events.zig @@ -140,8 +140,9 @@ pub fn announce(p: *Pardes) void { if (!pane.fs.unannounced) continue; pane.fs.unannounced = false; noteLog(p, .new, pane); - // A file opened (a look, a Restore, a boot): first in Recent. - if (pane.file) |f| if (f.output == null and pardes.Pardes.recentKeeps(f.path)) p.recent.opened(p.recentGpa(), f.path); + // A file, PDF or image opened (a look, a Restore, a boot): first in + // Recent. + if (pardes.Pardes.recentPlace(pane)) |d| if (pardes.Pardes.recentKeeps(d.path)) p.recent.opened(p.recentGpa(), d.path); } } |
