diff options
Diffstat (limited to 'src/ninep')
| -rw-r--r-- | src/ninep/ctl.zig | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/ninep/ctl.zig b/src/ninep/ctl.zig index fd3418a1..82001f32 100644 --- a/src/ninep/ctl.zig +++ b/src/ninep/ctl.zig @@ -642,6 +642,18 @@ pub fn writeRoot(p: *Pardes, req: Req) Reply { var it = Messages.init(p, req.data); while (it.next()) |line| { if (line.len == 0 or exec_line.isComment(line)) continue; + // `pardes -`'s: the directory's +Pager made or emptied, its + // serial what /exec reads back. + if (std.mem.startsWith(u8, line, "pager ") or std.mem.eql(u8, line, "pager")) { + if (!apply) continue; + const id = pardes.panes.Output.openPager(p, p.active, std.mem.trim(u8, line["pager".len..], " \t")) catch |err| + return tree.failText(req.tag, if (err == error.NoPaneRoom or err == error.NoPaneSlots) E.NOSPC else E.IO, switch (err) { + error.NoPaneRoom, error.NoPaneSlots => "pager: no space for a +Pager pane", + else => "pager: could not make a +Pager pane", + }); + noteResult(p, p.panes[id].?.serial); + continue; + } if (std.mem.startsWith(u8, line, "size ") or std.mem.eql(u8, line, "size")) { const size = sizeOf(line) orelse return refuse(p, req, e_size, line); // A frontend's window is the size; only a session none is |
