From 2ab8acae32ea4f1a0988f2f1f0841f7e7ac99e93 Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Mon, 16 Nov 2026 23:15:45 -0300 Subject: 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 --- src/CHANGELOG.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/CHANGELOG.md') diff --git a/src/CHANGELOG.md b/src/CHANGELOG.md index 4226e986..3297336e 100644 --- a/src/CHANGELOG.md +++ b/src/CHANGELOG.md @@ -7,7 +7,9 @@ value), so libvaxis is the tui's and the gui's alone, not the core module's. The 256-colour palette Petscii art and the window draw a palette colour with is pardes's own (`colors.xterm`), ghostty-vt's - default to the entry. + default to the entry. A `+Pager` (`pardes -`) reads its program's colour + codes with a parser of its own, which pages what ghostty-vt's did, byte + for byte, about 10% faster. - Commit patches open as `+Diff-` and reuse only their own commit's pane, so another paged patch no longer replaces one already open. -- cgit v1.3