diff options
Diffstat (limited to 'core')
| -rw-r--r-- | core/replica.zig | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/core/replica.zig b/core/replica.zig index 56fc4a59..ced4329d 100644 --- a/core/replica.zig +++ b/core/replica.zig @@ -6537,7 +6537,7 @@ test "a client's n in a kind's pane is a motion: it steps to the next place a re /// `addon`: a kind whose state is its own on the session (a PDF's), which /// the walk does not stand in (its Still has no search, place or word): /// the soak's (test/replicas.zig) PDF and pictures are, judged by name. -const On = enum { any, file, kind, shell, shell_normal, addon }; +const On = enum { any, file, kind, shell, shell_normal, addon, dir }; /// What a far client may wait a round trip for (the user's line, P14: a /// side effect on the system may be slow; motions, edits and layout are @@ -6558,6 +6558,12 @@ const may_wait = [_]Wait{ .{ .what = "LookPrev", .on = .any, .stop = "resolve", .why = "a Look's walk: each word asked of the disk" }, .{ .what = "Mini *", .on = .any, .stop = "resolve", .why = "a file opened by name, from the session's disk" }, .{ .what = "Get", .on = .any, .stop = "read_file", .why = "the file read again from the session's disk" }, + .{ .what = "Get", .on = .dir, .stop = "dir_listing", .why = "a directory listed again from the session's disk" }, + // A directory's pane (Dir.zig): its entries are names on the session's disk. + .{ .what = "Enter", .on = .dir, .stop = "resolve", .why = "the entry under the cursor opened, from the session's disk" }, + .{ .what = "* Enter", .on = .dir, .stop = "resolve", .why = "the entry opened (Enter after a prefix still opens it)" }, + .{ .what = "Tab", .on = .dir, .stop = "kind", .why = "what the entry under the cursor is, asked of the session's disk" }, + .{ .what = "* Tab", .on = .dir, .stop = "kind", .why = "what the entry is (Tab after a prefix still asks)" }, .{ .what = "Save", .on = .any, .stop = "write_file", .why = "a save" }, // A program run, a shell opened or closed: the session's processes. .{ .what = "Exec *", .on = .any, .stop = "kind", .why = "a program run: its name asked of the disk first" }, @@ -6833,12 +6839,16 @@ test "a far client's every word and key, on a file's pane, a kind's and a shell' _ = try a.local(.{ .command = "Still" }); const kind = a.core.view().active; try std.testing.expect(file != kind and a.core.panes[file].?.file != null and a.core.panes[kind].?.addon != null); + // A directory's pane (Dir.zig), listed from the disk. + _ = try a.local(.{ .command = try std.fmt.bufPrint(&line, "Look {s}/", .{dir}) }); + const listing = a.core.view().active; + try std.testing.expect(a.core.panes[listing].?.file.?.listing != null); var seen: [may_wait.len]bool = @splat(false); var hit: [may_wait.len]bool = @splat(false); var unlisted: u32 = 0; var tried: u32 = 0; - const stands = [_]struct { On, ?usize }{ .{ .file, file }, .{ .kind, kind }, .{ .shell, shell }, .{ .shell_normal, shell } }; + const stands = [_]struct { On, ?usize }{ .{ .file, file }, .{ .kind, kind }, .{ .shell, shell }, .{ .shell_normal, shell }, .{ .dir, listing } }; for (stands) |stand| { const on, const at = stand; const id = at orelse continue; |
