| |
|
|
|
|
|
| |
hands in (docs/next-editor.md): `key(a, syn, k)` and `run(a, syn, act)` take a `?*Syntax`, which keeps the grammar it parses in, the tree, made on the first walk after the text changes, and helix's object_selections (Alt-o's history, for Alt-i to go back the way it came) in the page allocator; with one, Alt-o, Alt-i, Alt-n, Alt-p, Alt-a, Alt-I, Alt-e, Alt-b and `]f` and kin run in the library, and `mif` and kin find the grammar's textobjects; without, they come back as actions, as before; normal.nodeTree is the parse they read, a file's (fileTree) in pardes and the one handed in in the library, `Editor.Tree` its tree, path and history, so nodeSelect and objectJump take the editor's context and are textAction's, textRole saying the walks are the text's with a parse at hand, and edit.textobjectSelect reads it too; NodeStep moves to Editor.zig (File.zig names it); nothing a pane does changes; hxlib hands each case a parse with no grammar (a case's text has none): 538 of 658 compared with 0 mismatches (expand_node's one case moved from the caller's), --parity 618 of 738 with 0 mismatches; test/lib: Alt-o and Alt-i on C, back the way they came, `maf` from a textobjects query handed in, and Alt-o without a parse the caller's; core-test 811 of 950, shell-test 990 of 993, hxdiff 658 / parity 738 / hxgolf 124 with 0 mismatches, replicas pass, lib-test pass
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T
|
|
|
the file pane (docs/next-editor.md, R6): test/hxlib.zig types each case into a `pardes-editor` value and prints its result as hxdiff prints a pane's, doing what an app does with the s, S, K and Alt-K it is handed back (the keys to <ret> its pattern, <esc> no answer) and printing a case that reaches any other action (a view, n and N, a macro, gw) as the caller's; hxdiff takes another driver's results (`--actual=`), and `zig build hxlib` (`-- --parity`) holds them to the goldens or the file pane; the key notation is test/hxkeys.zig, which both harnesses read; what the cases found, fixed: paneCursorLines gave the library's body no lines (mm, mi, ma, md, mr, insert-mode arrows), and the library's selectRegex keeps its pattern in `/` as pardes's prompt does (look.submitSearch); a page key in insert mode moves a view and is the caller's; test/lib's `zig build bench -- <KiB> <keys>`: a key's cost, the pages it changes, a parse; hxlib 537 of 658 compared with 0 mismatches (5 waived as for pardes, 121 the caller's), --parity 617 of 738 with 0 mismatches and 0 waived; hxdiff 658 / parity 738 / hxgolf 124 with 0 mismatches, core-test 811 of 950, shell-test 990 of 993, replicas pass, lib-test pass
|