diff options
| author | Gabriel Schneider <[email protected]> | 2026-09-29 11:40:03 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-10-01 00:12:16 -0300 |
| commit | 2f187232227dde2755a7f2f2ce717f3e1f685f5c (patch) | |
| tree | 0aebb2ad5831e235ab5833b514493878a00faf8c /src/ninep/events.zig | |
| parent | f0fc0be608bb1ee96c20d9f9baaefd2543fed7a2 (diff) | |
| download | pardes-2f187232227dde2755a7f2f2ce717f3e1f685f5c.tar.gz pardes-2f187232227dde2755a7f2f2ce717f3e1f685f5c.zip | |
Recent keeps only files on disk, and its cap never drops an open one
A renamed scratch never saved and a /virtual/ pane were recorded as recent files, and at 200 the oldest entry went even when that file was open. Opens, renames and closes now record a path only when it is a file on this host, and the cap drops the oldest closed entry. A name with a newline is not written to the kept list, where it would read back as two.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Diffstat (limited to 'src/ninep/events.zig')
| -rw-r--r-- | src/ninep/events.zig | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ninep/events.zig b/src/ninep/events.zig index 2fe25071..add0d750 100644 --- a/src/ninep/events.zig +++ b/src/ninep/events.zig @@ -141,7 +141,7 @@ pub fn announce(p: *Pardes) void { 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) p.recent.opened(p.recentGpa(), f.path); + if (pane.file) |f| if (f.output == null and pardes.Pardes.recentKeeps(f.path)) p.recent.opened(p.recentGpa(), f.path); } } |
