summaryrefslogtreecommitdiff
path: root/src/mouse.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-09-28 16:08:36 -0300
committerGabriel Schneider <[email protected]>2026-10-01 00:12:15 -0300
commit062523f4684e81715dec844bb1983b7bde7df5fc (patch)
tree7c998a7636ffb66d66a1ee6cf6f6bdc021b0e683 /src/mouse.zig
parentffef5a511a14071bd9be9887439a6cb40af3fb92 (diff)
downloadpardes-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/mouse.zig')
-rw-r--r--src/mouse.zig4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/mouse.zig b/src/mouse.zig
index f222b5da..1cfe6dbb 100644
--- a/src/mouse.zig
+++ b/src/mouse.zig
@@ -720,9 +720,7 @@ fn dispatchPointerBuiltin(
const operand = text orelse return;
if (gesture) |g| if (reportGesture(p, id, cmd, operand, g.on_tag, g.operand, arg != null)) return;
// A middle click on a body is the exec a bound REPL may take.
- p.exec_from_body = cmd == config.exec_cmd and gesture != null and !gesture.?.on_tag;
- defer p.exec_from_body = false;
- exec.runBuiltin(p, cmd, id, "", exec.withArg(p, operand, arg));
+ exec.runBuiltinFrom(p, cmd, id, "", exec.withArg(p, operand, arg), gesture != null and !gesture.?.on_tag);
}
fn mirrorTtySelection(p: *Pardes, pane: *Pane) void {