From 66c4095e140694376fd07c3afa0fee721558bdb3 Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Wed, 4 Nov 2026 23:38:29 -0300 Subject: 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 Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge --- src/ninep/cols.zig | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'src/ninep/cols.zig') 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 -- cgit v1.3