summaryrefslogtreecommitdiff
path: root/src/pardes.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/pardes.zig')
-rw-r--r--src/pardes.zig25
1 files changed, 13 insertions, 12 deletions
diff --git a/src/pardes.zig b/src/pardes.zig
index e65e48eb..32bf9cba 100644
--- a/src/pardes.zig
+++ b/src/pardes.zig
@@ -3719,10 +3719,10 @@ pub const Options = struct {
ninep_tcp: ?[]const u8 = null,
mounts: []const filesystem.Mount = &.{},
config_dir: ?[]const u8 = null,
- /// The store every window shares (Store.zig): the files opened lately,
- /// the panes closed. Set by the host that has a state directory; none,
- /// they last as long as the session.
- store_path: ?[]const u8 = null,
+ /// Recent's file, which every session of the user's shares (Store.zig).
+ /// Set by the host that has a state directory; none, Recent lasts as
+ /// long as the session.
+ recent_path: ?[]const u8 = null,
startup_config_path: ?[]const u8 = null,
image_allocator: ?std.mem.Allocator = null,
pdf_allocator: ?std.mem.Allocator = null,
@@ -3800,8 +3800,8 @@ pub const Pardes = struct {
/// The files opened lately, closed ones too (recent.zig): `Recent`,
/// /recent, and the jumplist's way back to a closed pane.
recent: recent_files.List = .{},
- /// Where Recent is kept, shared with every other window, and the panes
- /// this session closed, which Panes brings back (Store.zig).
+ /// Recent's file, shared with every other session, and the panes this
+ /// session closed, which Panes brings back (Store.zig).
store: Store = .{},
/// acme's Incl: the directories a look at a name that is nowhere else
/// (`stdio.h`, `<foo.h>`) is tried in, in order. The session's, seeded
@@ -4119,9 +4119,10 @@ pub const Pardes = struct {
"opts", "dump_out",
},
.derived = .{ "shell_rows", "diff_output", "locations_cache", "retired_panes", "tty_filter_palette", "body_chrome" },
- // The host's handles, the 9P server's fids and log, the store file
- // every window of the user shares (and Recent read from it), and
- // the files of a host with no file system of its own.
+ // The host's handles, the 9P server's fids and log, Recent's file
+ // every session of the user shares (and Recent read from it) with
+ // this session's closed panes, and the files of a host with no file
+ // system of its own.
.authority = .{ "host", "fs", "store", "recent", "fallback" },
.len = .{ .{ "jumps", "njumps" }, .{ "look_src", "n_look_src" }, .{ "leader_keys", "leader_n" }, .{ "col_x", "ncol" }, .{ "col_w", "ncol" }, .{ "session_dir", "session_dir_len" } },
};
@@ -4318,11 +4319,11 @@ pub const Pardes = struct {
return if (comptime hosted) std.heap.smp_allocator else p.gpa;
}
- /// The store read once at start: a new session's, Recent from it.
+ /// Recent's file read once at start: a new session's.
pub fn loadRecent(p: *Pardes) void {
// A replica's store is its own, in memory: the recording session's
- // file is every window's of its user (src/tape.zig).
- p.store = Store.init(if (tape.replaying()) null else p.opts.store_path);
+ // file is every session's of its user (src/tape.zig).
+ p.store = .{ .path = if (tape.replaying()) null else p.opts.recent_path };
p.store.load(p);
}