summaryrefslogtreecommitdiff
path: root/core/normal.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-11-24 20:39:07 -0300
committerGabriel Schneider <[email protected]>2026-11-24 20:42:02 -0300
commit3621482c586b1d0d3601a1668a307918f1faea93 (patch)
tree74900668c157fd681b4a510ff04ed9d4aa8b3eed /core/normal.zig
parent441e61294268bd0bb94abfa6b1ebb4ced23e726c (diff)
downloadpardes-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/normal.zig')
-rw-r--r--core/normal.zig2
1 files changed, 2 insertions, 0 deletions
diff --git a/core/normal.zig b/core/normal.zig
index 1f7ce1a7..2ec8a4da 100644
--- a/core/normal.zig
+++ b/core/normal.zig
@@ -1379,6 +1379,8 @@ fn executeNormalAction(p: *Pardes, t: *Text, a: modal.Normal.Action) edit.Error!
return look.lookWalk(p, if (a.role == .search_next) 1 else -1, false)
else if (t.what == .body and pane.file != null and pane.places.answersN(p, pane))
return pane.places.step(p, pane, a.role == .search_next, a.count, t.select)
+ else if (t.what == .body and panes.Pick.walkList(p, v.active, a.role == .search_next))
+ return
else
return searchStep(p.editor(), t, text, a.role == .search_next, a.count),
.goto_word => return startJump(p, pane, t),