diff options
Diffstat (limited to 'src/pardes.zig')
| -rw-r--r-- | src/pardes.zig | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/pardes.zig b/src/pardes.zig index d0bb9229..1cc1c5b8 100644 --- a/src/pardes.zig +++ b/src/pardes.zig @@ -6326,9 +6326,11 @@ pub const Pardes = struct { return; } } - const sel = look.expandedSel(p, pane, look.cursorWordSel(p, pane)) orelse return; - const word = edit.selectionText(p, pane, sel) catch return; - exec.runBuiltinFrom(p, cmd, p.active, "", word, true); + // The cursor's word as a click there takes it: one expansion + // (exec.operandAt), a diff line's address and all, and an + // event reader told as a click tells it. + const operand = exec.operandAt(p, pane, look.cursorWordSel(p, pane), false); + mouse.dispatchPointerBuiltin(p, p.active, cmd, operand.text, .{ .on_tag = false, .operand = operand }); return; } if (t.mode == .normal and t.what == .body and pane.hasPdf()) return normal.handlePdfNormal(p, pane, key); |
