summaryrefslogtreecommitdiff
path: root/src/exec.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-10-25 10:46:46 -0300
committerGabriel Schneider <[email protected]>2026-10-25 11:58:11 -0300
commitb8646ef838e4f33f1f3adbf3c08c251afc39ae73 (patch)
tree09a044c9c9792d37706bfb510b4de369b4f7b150 /src/exec.zig
parentbfdc8a9e61dd20c91b68f62187e724d1a98445a4 (diff)
downloadpardes-b8646ef838e4f33f1f3adbf3c08c251afc39ae73.tar.gz
pardes-b8646ef838e4f33f1f3adbf3c08c251afc39ae73.zip
query: B1 on a query pane is acme's B1: it places the caret and selects, nothing else (no other pane moves, nothing is previewed, the current row stays); only the keyboard moves the current row: Ctrl-n/Ctrl-p typing, n/N in the pane's normal mode (the caret with them, caretTo), j/k taking the caret onto a row (produce follows the caret on a key step only); Enter lands the current row; the current row's line mark is no selection B2/B3 borrow (exec.operandAt), so a click on it takes the word as on any row
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_016u3hBPFfja5pK4EBRC1UVD
Diffstat (limited to 'src/exec.zig')
-rw-r--r--src/exec.zig4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/exec.zig b/src/exec.zig
index 5b0eb204..7248632b 100644
--- a/src/exec.zig
+++ b/src/exec.zig
@@ -182,7 +182,9 @@ pub fn operandAt(p: *Pardes, pane: *Pane, clicked: Pane.Sel, borrow: bool, for_l
result.text = edit.currentSelText(p, pane);
return result;
}
- if (pane.body.msel.active and row >= @min(pane.body.msel.r0, pane.body.msel.r1) and
+ // A query pane's line selection is its current row's mark, not a
+ // selection made: a click on that row takes its word, as on any row.
+ if (pane.body.msel.active and pane.query == null and row >= @min(pane.body.msel.r0, pane.body.msel.r1) and
row <= @max(pane.body.msel.r0, pane.body.msel.r1))
{
result.text = edit.currentSelText(p, pane);