summaryrefslogtreecommitdiff
path: root/core/Trail.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-11-24 22:04:55 -0300
committerGabriel Schneider <[email protected]>2026-11-24 22:04:55 -0300
commit3da01ac676283c6d20ca6f2c0321b9dfe8cc59cd (patch)
tree10e3e31fa22186261856df814d6657a7e61cebe4 /core/Trail.zig
parentb28053aede910b8714db4f27ef66e59dd96945c0 (diff)
downloadpardes-3da01ac676283c6d20ca6f2c0321b9dfe8cc59cd.tar.gz
pardes-3da01ac676283c6d20ca6f2c0321b9dfe8cc59cd.zip
Prompt: sam prompts one after another make one recipe word, and `s S K A-K` show their scope and what K drops (walk UI, pick-ui SPEC.md §7.1's table, §7.5, item 3 of line E): a sam prompt (`s S K A-K | A-|`, sam's `x y g v | >`) right after another of the same pane's, no key between (Prompt.chain, ended by any key at rest but one that opens such a prompt: Prompt.keyAtRest from keys.handleKey, by a search, by `! A-! $`), extends the pane's one recipe word in its trail, the Edit line it is (`Edit x/self../ g/a/ |tr a-z A-Z`, Trail.setWord); a selecting one that found nothing adds no link; Look on the word puts back the selections its sam prompts made (Pane.recipe_sels, recipe_pri), Exec runs it as Edit (edit_cmd.run, sam's dot the primary selection: a recipe of selections alone prints its matches, as acme's Edit does); while `s S K A-K` is typed the lines the selections it began with cover are fenced `┃` in the gutter, and K's and A-K's selections that would go are dimmed and struck through (a visible line's ranges found by a binary search, never all of them a frame); wire 38; THE FAULTS THE 40,000-SEED FUZZ MET over a session holding a recipe, a search word and an open prompt (a dump or an image cut, flipped and grown loaded and used): View.focus_told's pane slot was never held to the panes (Core.zig reportFocus indexed p.panes past 64: a damaged image's), now a `.index` of its own; A's Field's caret was not held to its text (Field.insert copied past the buffer at caret 513), now a `.place`; Places.current past its places (Places.addTicks's tickOf, the prompt's count and the gutter) taken as none; a search word's `/re/` length past its text taken as its text's; a user loading a damaged Dump could have hit the first three; TEST FIRST: Prompt.zig "sam prompts one after another make one recipe word ..."; fuzz "a dump and an image cut" at 40,000 join and 1,779 image seeds (a temporary edit, put back): pass; the soak, 5 clients: diverged 0, unequal 0 at rtt 30/80/207, quiet checks 413/0 426/0 619/0, the corpus 22 scenes the same, exit 0; goldens pipe (the recipe word in the trail), selregex (the fence); core-test 1017/1183 (166 skipped), shell-test 1230/1233, pane-test 182/184, behaviour-test and its replay 274/277 (the failures A's, as on item 1), process-test A's six and none of mine (`exec` failed once under a load of 8 and passes alone), term-test 17/17, kitty-test 45/45
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Diffstat (limited to 'core/Trail.zig')
-rw-r--r--core/Trail.zig10
1 files changed, 6 insertions, 4 deletions
diff --git a/core/Trail.zig b/core/Trail.zig
index 0ea893e2..cb5dedf8 100644
--- a/core/Trail.zig
+++ b/core/Trail.zig
@@ -338,8 +338,8 @@ pub fn stepAt(t: *const Trail, part: Part, off: usize) ?u8 {
}
/// Look on step `i` of pane `id`'s trail (§6.3): a place is gone back or
-/// forward to, the owner focused, a search lit again (Prompt.zig); a list
-/// or a recipe is the pickers' and the prompts' to take (not yet: said).
+/// forward to, the owner focused, a search lit again, a recipe's
+/// selections put back (Prompt.zig); a list is the pickers' (not yet: said).
pub fn lookStep(p: *Pardes, id: usize, i: u8) void {
const pane = p.panes[id] orelse return;
switch (pane.trail.steps[i]) {
@@ -348,7 +348,8 @@ pub fn lookStep(p: *Pardes, id: usize, i: u8) void {
p.view().active = owner;
} else p.reportFailure(id, "walk: its owner is closed"),
.search => pardes.Prompt.lookWord(p, id),
- .list, .recipe => p.setMessage(.at(id), "walk: a list or a recipe is not walked yet"),
+ .recipe => pardes.Prompt.lookRecipe(p, id),
+ .list => p.setMessage(.at(id), "walk: a list is not walked yet"),
}
}
@@ -359,7 +360,8 @@ pub fn execStep(p: *Pardes, id: usize, i: u8) void {
switch (pane.trail.steps[i]) {
.place, .owner => lookStep(p, id, i),
.search => pardes.Prompt.execWord(p, id),
- .list, .recipe => p.setMessage(.at(id), "walk: a list or a recipe is not run again yet"),
+ .recipe => pardes.Prompt.execRecipe(p, id),
+ .list => p.setMessage(.at(id), "walk: a list is not run again yet"),
}
}