summaryrefslogtreecommitdiff
path: root/src/ninep/pane.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-11-17 00:38:41 -0300
committerGabriel Schneider <[email protected]>2026-11-17 12:15:01 -0300
commit26929e67111e843db4ad27abb4f1341cf396158c (patch)
tree8540497ac35231593742c17fb6df03ec0a16a76f /src/ninep/pane.zig
parent1d382a3ed42788e82301d0ce2a16ebc35c79046c (diff)
downloadpardes-26929e67111e843db4ad27abb4f1341cf396158c.tar.gz
pardes-26929e67111e843db4ad27abb4f1341cf396158c.zip
Term: text through the interface, the editing of the copy back to the core: Term.scrollback and Term.scrollbackLen are its whole history as plain text (its body, Save), Term.textRows its rows as text with a prompt's own cells cut off (a plain Term.Rows), Term.viewport the rows its view shows, Term.promptPrefix how many bytes of a row are its prompt and Term.markRead says a step read them; the editing of the copy of a terminal's rows is the core's again, in edit.zig beside the text it edits: shellRows and the rows' cache (edit.RowsCache, edit.drawing), terminalLines (the rows with the copy spliced in), and in edit.zig's own flatSurface, editText, setEditText, pushUndo and undoStep the terminal's arms written out where they were dispatched to terminal.zig; the body's walk over the rows and the copy (BodyWalk) is body_layer.zig's, beside the bodyText it makes; screenTextAlloc, screenTextLen, cursorLines, flatSurface, editText, setEditText, pushUndo, undoStep and bodyText leave terminal.zig; nothing else changes
Diffstat (limited to 'src/ninep/pane.zig')
-rw-r--r--src/ninep/pane.zig4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ninep/pane.zig b/src/ninep/pane.zig
index 3fa45404..13a15206 100644
--- a/src/ninep/pane.zig
+++ b/src/ninep/pane.zig
@@ -317,7 +317,7 @@ pub fn fileSize(p: *Pardes, id: usize, f: PaneFile) u64 {
const pf = &pane.fs;
return switch (f) {
// A terminal's body reads its screen and history, as text.
- .body => if (pane.file == null and pane.isTerminal()) panes.terminal.screenTextLen(pane) else if (kindText(p, pane)) |t| t.len else bodyOf(pane).len,
+ .body => if (pane.file == null and pane.isTerminal()) pardes.Term.scrollbackLen(pane.terminal) else if (kindText(p, pane)) |t| t.len else bodyOf(pane).len,
// What addr selects, generated by each read: no length, as acme's
// data and xdata have none.
.data, .xdata => 0,
@@ -441,7 +441,7 @@ fn readBody(p: *Pardes, req: Req, id: usize, pane: *Pane) Reply {
// A kind's body is its text (a PDF's, the page shown's): read-only.
if (kindText(p, pane)) |text| return tree.window(p, req, text);
if (req.handle != 0 and pane.isTerminal()) return screen.readSnapshot(p, req, pane);
- const text = panes.terminal.screenTextAlloc(pane, p.gpa) catch
+ const text = pardes.Term.scrollback(pane.terminal, p.gpa) catch
return Reply.fail(req.tag, E.NOMEM);
defer p.gpa.free(text);
return tree.window(p, req, text);