diff options
| author | Gabriel Schneider <[email protected]> | 2026-09-28 16:08:36 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-10-01 00:12:15 -0300 |
| commit | 062523f4684e81715dec844bb1983b7bde7df5fc (patch) | |
| tree | 7c998a7636ffb66d66a1ee6cf6f6bdc021b0e683 /src/builtins.zig | |
| parent | ffef5a511a14071bd9be9887439a6cb40af3fb92 (diff) | |
| download | pardes-062523f4684e81715dec844bb1983b7bde7df5fc.tar.gz pardes-062523f4684e81715dec844bb1983b7bde7df5fc.zip | |
Whether an exec came from a body travels with it, so every selection goes to the REPL
The execute key and the middle click marked a global flag that the first
execute cleared, so of several selections executed at once only the first
reached a bound REPL and the rest ran as commands. Where an exec came from
now goes with it, as acme's execute() asks of its Text (exec.c:122,169):
builtins.Ctx carries from_body, runBuiltinFrom and executeFrom take it, the
gestures set it, and chordEachSel sets it for each selection.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Diffstat (limited to 'src/builtins.zig')
| -rw-r--r-- | src/builtins.zig | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/builtins.zig b/src/builtins.zig index a9bc38f9..557145cb 100644 --- a/src/builtins.zig +++ b/src/builtins.zig @@ -44,6 +44,10 @@ pub const Ctx = struct { id: usize, txt: []const u8, arg: ?[]const u8, + /// Made by a gesture on the pane's body -- a middle click, the execute + /// key -- as acme's execute() asks of its Text (exec.c:122,169): an + /// Exec from a body may be a bound REPL's (exec.zig routeToRepl). + from_body: bool = false, }; fn isEnabled(comptime T: type) bool { @@ -397,7 +401,7 @@ pub const Exec = struct { pub fn run(c: Ctx) void { // the destination pane is Look's business (it focuses what answered); // an execute deliberately leaves you where you were - _ = exec.execute(c.p, c.id, c.arg orelse return); + _ = exec.executeFrom(c.p, c.id, c.arg orelse return, c.from_body); } }; |
