summaryrefslogtreecommitdiff
path: root/src/ninep/cols.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-11-04 23:38:29 -0300
committerGabriel Schneider <[email protected]>2026-11-05 00:58:28 -0300
commit66c4095e140694376fd07c3afa0fee721558bdb3 (patch)
treee7ce443023bd305cb5707be56731985ad55a11c3 /src/ninep/cols.zig
parent4592c18aa80d61a87026ca5823232ce56837f1f7 (diff)
downloadpardes-66c4095e140694376fd07c3afa0fee721558bdb3.tar.gz
pardes-66c4095e140694376fd07c3afa0fee721558bdb3.zip
ninep: one tree.window answers a read with the part of a text its offset and size ask for, where ten places (a frozen listing, a stream's replay, README, /screen, the sources, a PDF's or a terminal's body, a tag, a column's) windowed by hand; /status, the root ctl, /commands and /listeners are each one text in the step's scratch, read and counted from it, so the xLen and readX pairs (statusLen, rootLen, commandsLen, readStatus, readRoot, readCommands, readPane, readListeners) go; tree.read asks openOf once
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge
Diffstat (limited to 'src/ninep/cols.zig')
-rw-r--r--src/ninep/cols.zig5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/ninep/cols.zig b/src/ninep/cols.zig
index 833b25c5..1445a3c3 100644
--- a/src/ninep/cols.zig
+++ b/src/ninep/cols.zig
@@ -60,11 +60,8 @@ pub fn headerText(p: *Pardes, serial: ?u32) ?[]const u8 {
pub fn read(p: *Pardes, req: Req, serial: ?u32) Reply {
applyTruncation(p, serial);
- const text = headerText(p, serial) orelse return Reply.fail(req.tag, E.NOENT);
- const out = p.fs.stage(p.gpa);
// As a pane tag reads: the text alone, no newline after it.
- out.appendSlice(p.gpa, text) catch return Reply.fail(req.tag, E.NOMEM);
- return tree.stagedReply(p, req);
+ return tree.window(p, req, headerText(p, serial) orelse return Reply.fail(req.tag, E.NOENT));
}
/// A write appends, as a pane tag's does; the tag is one line, so a newline