summaryrefslogtreecommitdiff
path: root/src/ninep/pty.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-11-17 00:35:08 -0300
committerGabriel Schneider <[email protected]>2026-11-17 12:15:01 -0300
commitd7b3d57ed0ba649f01559356fbf2bf89561990ca (patch)
tree37c95f8c04fd86961197a54adbb920675034d98a /src/ninep/pty.zig
parent218d574b59abd7fb8dd6fe027b12927fc31c3506 (diff)
downloadpardes-d7b3d57ed0ba649f01559356fbf2bf89561990ca.tar.gz
pardes-d7b3d57ed0ba649f01559356fbf2bf89561990ca.zip
rows: a pane's rows from outside, one definition and two sinks: File.setRows is the one writer of a pane's rows (locations.Row, the stored form as it was: digest, dump and blobs unchanged), refusing what its text cannot hold (more rows than lines, an offset or styles past a line's end) and keeping the painting of equal rows; Output.fillRows keeps what is the editor's (the pane, its refill identity, the steps) and hands its rows to it, as the query panes' three writers do; locations.formatRows and parseRows are its text, a line a row, fields a blank apart and the path last (kind m c p with d and u, line col end_line end_col source_column location_end code_start, styles as `-` or `N:start+len=role,...` a role a syntax class and grounds joined by dots); each pane directory over 9P has `rows`, read as that text (+Search's, +Callstack's addresses as data) and written whole lines at a time, at 0 replacing and later following (a line cut by a mount waits for its open's next write; tree.writeLines passes a line on at the offset it was begun at), `>` emptying them; tests: the rows of a +Search, a +Callstack and a +Diff read back from their text equal, byte for byte, and the file read, written whole and across writes, refused and emptied; README, reference and changelog say so
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T
Diffstat (limited to 'src/ninep/pty.zig')
-rw-r--r--src/ninep/pty.zig4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ninep/pty.zig b/src/ninep/pty.zig
index 7333fac7..350978e3 100644
--- a/src/ninep/pty.zig
+++ b/src/ninep/pty.zig
@@ -507,7 +507,7 @@ test "a pane that is not a terminal has no pty/ at all" {
var buf: [32]th.Dirent = undefined;
const files = th.dirents(rdir(p, dir, 0).bytes, &buf);
- try testing.expectEqual(@as(usize, 18), files.len);
+ try testing.expectEqual(@as(usize, 19), files.len);
try testing.expect(th.nameAt(files, "pty") == null);
try testing.expectEqual(E.NOENT, look_up(p, dir, "pty_ctl").errno());
@@ -528,7 +528,7 @@ test "a terminal pane's pty/ holds exactly ctl, status and data" {
var buf: [32]th.Dirent = undefined;
const files = th.dirents(rdir(p, dir, 0).bytes, &buf);
- try testing.expectEqual(@as(usize, 19), files.len);
+ try testing.expectEqual(@as(usize, 20), files.len);
try testing.expect(th.nameAt(files, "pty").?.dir);
const inside = th.dirents(rdir(p, Node.of(serial, .pty), 0).bytes, &buf);