diff options
| author | Gabriel Schneider <[email protected]> | 2026-11-24 19:31:05 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-11-24 19:31:05 -0300 |
| commit | f44d1b7d040acf674814be3cde336527833450e9 (patch) | |
| tree | 9c22c45541f16e4281a0a504084e3cf6e389d1c8 /core/mouse.zig | |
| parent | 326a2bac9558da0ff78987e697546a363b2b8e59 (diff) | |
| download | pardes-f44d1b7d040acf674814be3cde336527833450e9.tar.gz pardes-f44d1b7d040acf674814be3cde336527833450e9.zip | |
TagState, Field, Band: the typing state, and Help over the binding tree (walk UI, pick-ui SPEC.md §3.2's typing row and §4.5, item 4 of line A): a tag's typing state is the view's (TagState.kind help, its host pane by serial, the hostOf every tag's text asks), its box `^` whatever the body's mode, its caret a bar at the field's (the body's caret and its layer's put by while the head is typed in), and it takes every key before anything but a question (keys.zig tagStateKey: Esc back to rest, Enter runs the row typed as its keys, Backspace on an empty field back to the level `?` was struck from, unrolled); SPC ? is Help over every leaf of every root (SPC's, g m z Z [ ]'s, window mode's, the addons' words) and `?` down a level or under a helix prefix Help for that level's (SPC l ?, g ?); its head ` Help ␣ l <field> n/N`; its rows `chord · word · group` scored by the query pane's scorer (Names.match, now pub) on each key into the view's fixed hits (max_hits: the tree's 160 leaves and the registry's 64 words; best first, the tree's order while the field is empty), the band shows eleven around the cursor, the query's bytes in the match tint, the cursor's leaf's doc beside them; `Help <name>` stays the word's +Help; FOR THE PICKERS AND PROMPTS, as they are: Field (core/Field.zig: a one-line field in a fixed 256-byte buffer with its caret, each view's in TagState.field; Field.key takes a line editor's keys: characters, Backspace/C-h, Delete/C-d, Left/C-b, Right/C-f, Home/C-a, End/C-e, C-u, C-k, C-w/M-Backspace, M-b, M-f; false for a key it has no use for, Enter, Esc, the arrows, which its owner takes; set, insert, clear) and Band.Cursor (a list's cursor, TagState.rows: Cursor.key steps it on Down/C-j/C-n, Up/C-k/C-p, PageDown/PageUp; Cursor.window(n) is the eleven rows [lo, hi) a band shows around it); a state's head is a TagState.Head {text, spans, caret}, its band Band.of's switch on TagState.kind; TagState.follow takes no argument now (a root a state puts back is current already: Help's Backspace keeps its level unrolled); TESTS: Field.zig's (a line editor's keys, and the keys it leaves), TagState.zig's two (SPC ? over every root, filtered, the box and the caret, Enter runs Wrap; SPC l ? and g ? scoped, Backspace back to the level unrolled, Esc to rest); core-test 1003 pass, 166 skip, 0 fail
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Diffstat (limited to 'core/mouse.zig')
0 files changed, 0 insertions, 0 deletions
