summaryrefslogtreecommitdiff
path: root/src/ninep/ctl.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-11-16 23:15:45 -0300
committerGabriel Schneider <[email protected]>2026-11-17 12:15:01 -0300
commit2ab8acae32ea4f1a0988f2f1f0841f7e7ac99e93 (patch)
treeb1b9e225266634bcb8f2ac551e2df6d05730b5db /src/ninep/ctl.zig
parenta7a446e0f32cb9daaa06689c91ef7de01bfc968c (diff)
downloadpardes-2ab8acae32ea4f1a0988f2f1f0841f7e7ac99e93.tar.gz
pardes-2ab8acae32ea4f1a0988f2f1f0841f7e7ac99e93.zip
pager: a +Pager reads its program's output with its own parser, so pager.zig stops importing ghostty-vt: ECMA-48's states as ghostty-vt's table has them (C0 acted on in an escape or a CSI, dropped in a string, the C1 bytes' transitions outside an OSC's and a DCS's data, CAN and SUB), UTF-8 with each ill-formed part one U+FFFD and a sequence the input ends inside not printed, a CSI's parameters at ghostty's limits (24, saturating, colons only for SGR), and SGR read as its sgr.Parser reads it (colon colours with and without a colour space, 38;5 short of its index, unknown colon lists skipped, 58 consumed); CNL and CPL's return, CHT and REP as before; the Handler's printing, spans and overstrike are unchanged and still take a run of code points at a time; against the ghostty-driven parse, 400,040 pages (39 fixed: the tests' 17 inputs and 22 malformed, truncated and 8-bit cases; 400,000 random pages of escapes, parameters, controls, C1 bytes and UTF-8 fragments, a 3,000-line coloured log) came out with the same text and spans, in a test run once then removed; a 32 MiB coloured log parses in 1,997M instructions against 2,049M (98.6 ms against 110.3 ms, ReleaseFast), its printable ASCII going straight into the run; test: the less common forms, pinned (colon colours, 0x9b as a stray byte, CSI and UTF-8 C1, REP, CHT, CNL, 38;5 alone, UTF-8 cut short); the changelog says so
Diffstat (limited to 'src/ninep/ctl.zig')
-rw-r--r--src/ninep/ctl.zig2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ninep/ctl.zig b/src/ninep/ctl.zig
index 699b7833..a72e7259 100644
--- a/src/ninep/ctl.zig
+++ b/src/ninep/ctl.zig
@@ -699,7 +699,7 @@ pub fn writePager(p: *Pardes, req: Req) Reply {
/// The text a /pager open wrote after its directory (`held`), a program's
/// output for a terminal, put in the +Pager `serial` as `pardes -` once
-/// wrote it to the body: through ghostty-vt (pager.zig), its colours kept
+/// wrote it to the body: through pager.zig's parse, its colours kept
/// as the pane's spans, one undo step, and left
/// clean. Reads of the pane are its plain text. The held bytes go either way.
pub fn fillPager(p: *Pardes, serial: u32, held: *std.ArrayList(u8)) error{OutOfMemory}!void {