diff options
| author | Gabriel Schneider <[email protected]> | 2026-11-24 20:39:07 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-11-24 20:42:02 -0300 |
| commit | 3621482c586b1d0d3601a1668a307918f1faea93 (patch) | |
| tree | 74900668c157fd681b4a510ff04ed9d4aa8b3eed /core/builtins.zig | |
| parent | 441e61294268bd0bb94abfa6b1ebb4ced23e726c (diff) | |
| download | pardes-3621482c586b1d0d3601a1668a307918f1faea93.tar.gz pardes-3621482c586b1d0d3601a1668a307918f1faea93.zip | |
Pick: after Enter, the list word (walk UI, pick-ui SPEC.md §5.6, §6.1-§6.3 list words and n/N, item 4 of line D): Enter rolls the list into the trail of the reading pane it landed in as one word before the place, `Find pick 3/6 •2` (its word, refinements and query, where its cursor is among its rows, its marks; Trail.through, B's Trail.zig: the list a step came through), the list keeping its rows, marks, cursor and query in the session's ring; n and N in that pane walk its rows, the newest list or search word's (normal.zig, after the text's own places: a search made since is n's), in place of the current step (Trail.replaceStep: no step pushed, a file of its own a pane in its place as a step's), its word saying where it is now; a Look on the word (Trail.lookStep's list arm) unrolls the list again in that pane's tag as it was, an Exec (execStep's) runs its source again with its query from there; Resume (`SPC '`, a new builtin, docs/typ/builtins-tui.json regenerated) reopens the last picker from the pane the keyboard is in, in the tag of the pane its Enter lands in; Enter lands from the landing pane when it reads (the owner's reader or the asker itself) and from the owner otherwise; THE FAULT IT MET (B's Trail.zig, never reached before a list word existed): Trail.wordOf returned a list's, a search's or a recipe's text out of a copy of the step made by its switch, gone at the return, so a list word drew as freed bytes; the switch takes the step's own now; TEST FIRST: Pick.zig "after Enter the list is a word in the reader's trail: n and N walk its rows in place, a Look on it reopens it with its cursor and marks, Exec runs it again, Resume reopens the last" (failed on the freed bytes first); core-test 1018/1184 (166 skipped), 0 failed
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Diffstat (limited to 'core/builtins.zig')
| -rw-r--r-- | core/builtins.zig | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/core/builtins.zig b/core/builtins.zig index 12ab9da5..589915c2 100644 --- a/core/builtins.zig +++ b/core/builtins.zig @@ -1998,6 +1998,16 @@ pub const Forward = struct { } }; +/// Reopen the last picker as it was: its rows, marks, cursor and query. +/// +/// In the tag of the pane its Enter lands in from this one: this pane if it +/// reads, else its reader. `SPC '`. +pub const Resume = struct { + pub fn run(c: Ctx) void { + pardes.Pick.resumeFrom(c.p, c.id); + } +}; + /// Keep this pane: a reading pane, which a jump steps, is held from now on. /// /// Its walk leaves its tag (its places, its owner): the next jump from its |
