From 26929e67111e843db4ad27abb4f1341cf396158c Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Tue, 17 Nov 2026 00:38:41 -0300 Subject: 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 --- src/ninep/ctl.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/ninep/ctl.zig') diff --git a/src/ninep/ctl.zig b/src/ninep/ctl.zig index a72e7259..2e045a73 100644 --- a/src/ninep/ctl.zig +++ b/src/ninep/ctl.zig @@ -426,7 +426,7 @@ pub fn paneText(p: *Pardes, pane: *Pane, buf: *[pane_text_cap]u8) []const u8 { pane.serial, if (pane_files.tagOf(p, pane)) |tag| tag.len else |_| 0, // a length, as a stat's: none when the tag cannot be made // A terminal's body is its history, read whole on an open's first read. - if (pane.isTerminal()) panes.terminal.screenTextLen(pane) else pane_files.bodyOf(pane).len, + if (pane.isTerminal()) pardes.Term.scrollbackLen(pane.terminal) else pane_files.bodyOf(pane).len, // A directory pane is one, as acme's isdir says. @intFromBool(if (pane.file) |f| f.listing != null else false), @intFromBool(pane_files.dirtyOf(pane)), -- cgit v1.3