summaryrefslogtreecommitdiff
path: root/docs/typ
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-11-26 09:41:38 -0300
committerGabriel Schneider <[email protected]>2026-11-26 10:16:37 -0300
commit2dae98b564e677c24c5275070c413d05a85d12fc (patch)
tree6a18f7ea935efdfca0b6f50229ca9eca6052741d /docs/typ
parent0fb10f2748bc1593b9c0dda0e74b53cb66a69a95 (diff)
downloadpardes-2dae98b564e677c24c5275070c413d05a85d12fc.tar.gz
pardes-2dae98b564e677c24c5275070c413d05a85d12fc.zip
abi, Kind, pdf, fake: ABI 3.4, a kind's window holds the theme's search hit colours, `hit` and `hit_current` (Chrome's, read through p.chrome() as each pane of a kind is painted), and a PDF's search draws its hits in them, the current hit apart, where every hit was the literal amber #ffd54f (the colour line's leftover, themes DESIGN.md part F, L2e's row "PDF hits", B8's `PDF's ffd54f -> chrome.hit`: "current hit" had three colours, the body's, the rail's and the PDF's); THE ABI: pa_window gains `uint32_t hit, hit_current` at its end (24 to 32 bytes, the header's and Kind.zig's size checks), PA_ABI_MINOR 4; an addon reads them once `api->abi >= 0x30004`, so one built against 3.3 loads, opens and paints as before (the core refuses another major only, and reads nothing new of an addon), and one built against 3.4 under an older pardes is handed the amber its PDFs drew (abi/addon.zig's Window, filled by the glue); WHY THE WINDOW, NOT THE VIEW (pa_view, where fg, bg, sel and link are): a view's facts are a step's (`view` is on the tape, and a plain kind keeps them in its block: the pdf's Layout holds the whole pa_view), so two more colours there would grow the pdf's block, and an Upgrade's revival hands `load` the old block, whose size it would refuse, every open PDF a placeholder; the hits are drawn by paint alone, which writes nothing a step reads, and the window is made each paint; THE CORE: Kind.paint fills them, the theme colour's PA_RGB by Kind's one `rgb` (viewOf's, out of its function); THE PDF: paint hands its window to reconcile, and marksOf marks each hit of the page in `win.hit`, those of the current hit (`find.hit`, its quads) in `win.hit_current`, at the alpha they had; THE FAKE: paints `hits rrggbb rrggbb` on its fifth row (since 3.4), and is built once more with its head saying 3.3 (`fake_addon_old`, named fakeold); addons/fake/fake.out re-recorded (that row in each of its 11 frames, `hits 5e4923 917a53`, the addon test's theme; nothing else moved); docs/typ/reference.typ's paint says it; RUN (TEST FIRST): behaviour/addons.zig "addons: a kind's pane is painted with the theme's search hit colours, the current hit's apart (ABI 3.4), and a library whose head says 3.3 still loads, opens and paints": acme's `hits ffc790 a05200`, then neonotte84's `hits 4c301a e59d3c`, then fakeold listed `3.3 ... loaded` and its pane's `count 0`: with the header and the fake alone fails (the core's window `hits 000000 000000`), passes now; pdf.zig "a search's hits are marked in the theme's hit colours its window is painted with, the current hit in the current hit's (ABI 3.4)": a page's three quads, the second hit's two current: fails with the amber (expected 4c301a70, found ffd54f70), passes now; the ABI the addons say in /addons moves to 3.4 in five behaviour checks; a user saw every PDF hit amber in every theme and the current one no different; NEW HOT PATHS: per frame, per pane of a kind painted, two colours packed from the chrome (no allocation, no derivation: Chrome's resolved fields); none per key; GATES (the stack kysrwqpz, rqlxkzuq, this, Debug): core-test 1163/1338 (175 skipped: +1 skipped, the rerun test needs a terminal), shell-test 1379/1382 (3 skipped), pane-test 184/185, behaviour-test 288/288 (+1) and --replay 20 seeds of 70 steps, 0 failures, process-test 0 of 149 failed (3 skipped), term-test 17/17, kitty-test 45/45, addon-test 157/157 steps, 8/8 tests (fake.out, snake, pdf and their own tests); the soak with the pdf addon on this top found a second preview leak, pictures (the next change); the 40,000-seed dump fuzz crashed at join seed 8324 in draw.zig's Debug overlay (a General protection exception printing a string from a damaged dump), whose dumped session has no kind, no command pane and no window: these changes move none of its bytes (see the report); pdf-harness tui fails `KittyPdfBoundaryPageMissing` on M2 alike (8959b031dc33, run here), not this change's; no dump layout change (the window is made each paint); load 4.5 to 12.5
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNBFhdevVu48bvL9kCE
Diffstat (limited to 'docs/typ')
-rw-r--r--docs/typ/reference.typ4
1 files changed, 4 insertions, 0 deletions
diff --git a/docs/typ/reference.typ b/docs/typ/reference.typ
index 126330fa..2b0f31c0 100644
--- a/docs/typ/reference.typ
+++ b/docs/typ/reference.typ
@@ -1171,6 +1171,10 @@ of it is laid out by `view` and drawn by `paint`.
and a click say the view they came from. `paint` is called once a frame
in each view, `win->view` the one, and changes nothing (a Debug build
checks the kind's memory across it); a picture over 32 MiB is dropped.
+ Since ABI 3.4 the window holds the theme's search hit colours,
+ `win->hit` and the current hit's `win->hit_current` (`PA_RGB`), which an
+ addon reads once `api->abi >= 0x30004`: a PDF's search draws its hits
+ in them, as the body draws a file's.
- Every call returns within 2 ms; what takes longer goes on a job. A Debug
pardes says a call over 16 ms once (`pdf: search took 118 ms, over 16
ms`) and `--addon-test` fails on it.