summaryrefslogtreecommitdiff
path: root/src/ninep/pty.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-11-17 00:17:45 -0300
committerGabriel Schneider <[email protected]>2026-11-17 12:15:01 -0300
commit5354090b6122faf0d18e246a55e8a4ead0955394 (patch)
treef27fc08bba1ceded6bf315125090ef0b64405463 /src/ninep/pty.zig
parentc742d19d4bacbd9a91627c4859ca8cb0d11bdba7 (diff)
downloadpardes-5354090b6122faf0d18e246a55e8a4ead0955394.tar.gz
pardes-5354090b6122faf0d18e246a55e8a4ead0955394.zip
Term: output and view through the interface: Term.feed takes one read and the rows the core keeps positions on and gives back a Term.Told (where each went, erased or not, cleared, alive, a pin missed), Term.grid is the plain record of the view and the cursor (total, offset, len, the cursor, whether it shows, the view's row or null while it follows), Term.scroll, Term.follow, Term.viewTo, Term.resize (now or for later) and Term.resizeDeferred move it, Term.cellPixels sizes its cells in pixels and Term.replies hands over what it answered its program; the core's half is the core's: Pane.feedOutput and its row tracking (the edit copy's rows, the cursors and selections, their undo and the pointer's rows, gathered as rows and moved as the feed told, ingestWithPositions's core) and Pane.followOutput, Pane.resizeGrid and Pane.panFor in panes.zig with panes.resizeDeferred, the cursor a program shows read from the grid where the body draws it, tape.viewOnly beside tape.authorityOnly; scrollbar, gridOffset, gridCursor, visibleCursor, viewOf, atBottom and their types go; nothing else changes
Diffstat (limited to 'src/ninep/pty.zig')
-rw-r--r--src/ninep/pty.zig6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/ninep/pty.zig b/src/ninep/pty.zig
index 7333fac7..2ef9c13d 100644
--- a/src/ninep/pty.zig
+++ b/src/ninep/pty.zig
@@ -302,7 +302,7 @@ pub fn noteMarks(p: *Pardes, id: usize, pane: *Pane) void {
// A prompt on the alternate screen (its program killed there): the
// emulator leaves it first, as a reused command pane does, so the
// run's output lands on the primary screen and is read whole.
- if (pardes.panes.terminal.onAlternateScreen(pane)) pardes.panes.terminal.feedOutput(p, pane, "\x1b[?1049l");
+ if (pardes.panes.terminal.onAlternateScreen(pane)) pane.feedOutput(p, "\x1b[?1049l");
p.emitWrite(id, slot.line);
p.emitWrite(id, "\r");
pardes.panes.terminal.noteCommand(pane, slot.line);
@@ -1005,10 +1005,10 @@ test "a run's answer says cut when its output's start is gone, and reads a bound
// A resize between its start and end reflows the pins with the text.
h = sh.send(p, node);
sh.put(p, c ++ "one\r\ntwo\r\n");
- pardes.panes.terminal.resizeGrid(pane, 50, 20);
+ pane.resizeGrid(50, 20);
sh.put(p, d ++ prompt);
try testing.expectEqualStrings("exit 0\none\ntwo\n", sh.answered(p, node, h, into));
- pardes.panes.terminal.resizeGrid(pane, pane.cols, pane.rows);
+ pane.resizeGrid(pane.cols, pane.rows);
// A full-screen program leaves nothing on the primary screen, and a D
// with no status is not a success.