From 441e61294268bd0bb94abfa6b1ebb4ced23e726c Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Tue, 24 Nov 2026 20:33:44 -0300 Subject: Pick: the act step (walk UI, pick-ui SPEC.md ยง5.5, item 3 of line D): M-l or M-Enter unrolls the acts beside the rows, headed by what they act on (`on 2 marked`, `on core/pick.zig`), and the head's second row says them before the sources' words (`Walk Look Split Newcol Grep Edit Copy Keep Drop | Grep Recent ...`); a key letter or Enter on the act's row: w Walk lands on the first picked place and queues the others (Pick.queue, the places as paths and spots), which Ctrl-i steps in the landing pane past its newest step (Pick.stepQueue, at the hook B left in Jump.jumpBy), o Look, s Split, v Newcol (Enter's three ways), g Grep a Grep picker in the picked rows' directory with the same pattern, e Edit the field a sam command (the head `Find pick | Edit s/a/b/`) run by Enter on each picked row's line in the open text that shows it (edit_cmd.run, from the last line up, a row whose file no pane shows passed over and said), y Copy the places as `path:line` lines into the unnamed register, k Keep as C-q, x Drop the picked rows as a refinement without them, d Del (the Panes list's, whose acts are Look Copy Keep Drop Del: its rows are no places) closes the picked panes and lists them again; an act's or a source's word run while the picker is live (B2 on the head's second row or on the band) is the picker's (Pick.execWord, at the head of exec.zig executeBuiltinLine; Grep, both, is the source); B3 on a picker's row lands on it and B2 runs the word with the picker live (mouse.zig bandPress: the picker's arm before A's toRest); a landing pane previewed in its own file has its caret and top put back when the picker rolls up (said in item 2's description, made here); TEST FIRST: Pick.zig "M-l unrolls the act step, which says what it acts on; Copy puts the places in the register, Drop takes the picked rows out, Walk queues the rest for C-i"; core-test 1017/1183 (166 skipped), 0 failed MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 5.5 --- core/exec.zig | 2 ++ 1 file changed, 2 insertions(+) (limited to 'core/exec.zig') diff --git a/core/exec.zig b/core/exec.zig index 2528805f..ad1cefea 100644 --- a/core/exec.zig +++ b/core/exec.zig @@ -874,6 +874,8 @@ pub fn executeBuiltinLine(p: *Pardes, id: usize, txt: []const u8) bool { const raw = commandText(txt); if (raw.len == 0 or p.exec_depth >= max_exec_depth) return false; if (isComment(raw)) return true; + // A live picker's act and source words are its own (Pick.zig). + if (pardes.Pick.execWord(p, raw)) return true; // `+` too, so an old `Tty+fish` is renamed as `Tty fish` is. const word_end = std.mem.indexOfAny(u8, raw, " \t+") orelse raw.len; var renamed: [1024 + 16]u8 = undefined; -- cgit v1.3