summaryrefslogtreecommitdiff
path: root/src/dump.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-09-29 12:14:13 -0300
committerGabriel Schneider <[email protected]>2026-10-01 00:12:16 -0300
commitab220b89afcfda848cf84c18cc135a2e5c392b79 (patch)
tree7fd2e82e88d0dd86aa3b2dc2a8146643fcacd9de /src/dump.zig
parentc30835e62d3b7dd03ee8b28fbcff97d3b88bcd95 (diff)
downloadpardes-ab220b89afcfda848cf84c18cc135a2e5c392b79.tar.gz
pardes-ab220b89afcfda848cf84c18cc135a2e5c392b79.zip
Recent goes on across a Restore, and is kept after it
A Restore makes a new session, which never loaded the kept list, and saveRecent gives up until it has: Recent was empty after a Restore and nothing opened afterwards was kept. The new session now takes the old one's list (a boot from a dump reads the kept file). Co-Authored-By: Claude Opus 5.5 <[email protected]>
Diffstat (limited to 'src/dump.zig')
-rw-r--r--src/dump.zig5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/dump.zig b/src/dump.zig
index 7b27876e..4db3df24 100644
--- a/src/dump.zig
+++ b/src/dump.zig
@@ -802,7 +802,10 @@ fn initDump(gpa: std.mem.Allocator, opts: Options, zon_bytes: []const u8, previo
p.cell_pixels = old.cell_pixels;
p.row_metrics = old.row_metrics;
p.native_images = old.native_images;
- }
+ // Recent goes on across a Restore, the old session's own list.
+ p.recent = old.recent.clone(p.recentGpa());
+ p.recent_loaded = old.recent_loaded;
+ } else p.loadRecent();
for (opts.mounts) |mount| try p.fs.mount(gpa, mount.name, mount.dial);
p.opts.mounts = &.{};
var parsed = try readZon(gpa, zon_bytes, "load");