diff options
Diffstat (limited to 'src/ninep/tree.zig')
| -rw-r--r-- | src/ninep/tree.zig | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/ninep/tree.zig b/src/ninep/tree.zig index f45a1a90..398824d5 100644 --- a/src/ninep/tree.zig +++ b/src/ninep/tree.zig @@ -259,6 +259,9 @@ pub const PaneFile = enum(u5) { event, look, exec, + /// A word run as a click in the pane's tag, as /tagexec is in the + /// workspace's and col/<n>/exec in a column's. + tagexec, pty, pty_ctl, pty_status, @@ -965,7 +968,7 @@ fn linesFile(target: Target) bool { return switch (target) { .top => |f| f == .look or f == .exec or f == .ctl or f == .tagexec, .col => |c| c.file == .ctl or c.file == .exec, - .pane => |t| t.file == .look or t.file == .exec or t.file == .ctl, + .pane => |t| t.file == .look or t.file == .exec or t.file == .ctl or t.file == .tagexec, }; } @@ -974,7 +977,7 @@ fn resultsFile(target: Target) bool { return switch (target) { .top => |f| f == .look or f == .exec or f == .tagexec, .col => |c| c.file == .exec, - .pane => |t| t.file == .look or t.file == .exec, + .pane => |t| t.file == .look or t.file == .exec or t.file == .tagexec, }; } @@ -1025,7 +1028,7 @@ fn write(p: *Pardes, req: Req, target: Target) Reply { fn writeNow(p: *Pardes, req: Req, target: Target) Reply { switch (target) { .top => |f| return switch (f) { - .look, .exec => ctl.command(p, req, null, f == .exec), + .look, .exec => ctl.command(p, req, null, f == .exec, false), .log => events.writeLog(p, req), .focus => ctl.writeFocus(p, req), .ctl => ctl.writeRoot(p, req), @@ -1234,10 +1237,10 @@ test "readdir lists the root and a pane directory without creating anything" { const dir = rdir(p, Node.of(serial, .dir), 0); const files = th.dirents(dir.bytes, &buf); - try testing.expectEqual(@as(usize, 17), files.len); + try testing.expectEqual(@as(usize, 18), files.len); for ([_][]const u8{ "name", "body", "tag", "ctl", "addr", "dot", "limit", "data", "xdata", - "sel", "dirty", "mark", "scroll", "errors", "event", "look", "exec", + "sel", "dirty", "mark", "scroll", "errors", "event", "look", "exec", "tagexec", }, 0..) |name, i| try testing.expectEqualStrings(name, files[i].name); try testing.expect(th.nameAt(files, ".") == null); |
