summaryrefslogtreecommitdiff
path: root/src/pardes.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-09-28 19:20:20 -0300
committerGabriel Schneider <[email protected]>2026-10-01 00:12:15 -0300
commitb08322345b33abcee114c05c85fa4c46c10f4701 (patch)
tree645cbacce7ef1d5c7abd71f0b76a3c72e763835d /src/pardes.zig
parent8429e7bd8aff1ae0c71d3b1a7a6b9f01ed52e691 (diff)
downloadpardes-b08322345b33abcee114c05c85fa4c46c10f4701.tar.gz
pardes-b08322345b33abcee114c05c85fa4c46c10f4701.zip
A double-click selects as acme's does: a word, a line, a bracketed or quoted text
A second B1 click at the same cell selected nothing more. Now, as acme's textdoubleclick (plan9port text.c:1407), it selects up to the match of a bracket just before or after the point, the whole line at a line's start or end, the quoted text inside ' " `, or else the word, in bodies, tags and terminals in normal mode. A plain click still puts the caret on its cell. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Diffstat (limited to 'src/pardes.zig')
-rw-r--r--src/pardes.zig3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/pardes.zig b/src/pardes.zig
index cebd851b..60d0f51b 100644
--- a/src/pardes.zig
+++ b/src/pardes.zig
@@ -4115,6 +4115,9 @@ pub const Pardes = struct {
pointer_tag_hit: ?TagHit = null,
raw_hover_intent: bool = false,
pointer_inside: bool = false,
+ /// The last plain B1 click, for acme's double-click (text.c:881,
+ /// textselect: a second click at the same point within 500 ms).
+ last_click: ?struct { id: usize, on_tag: bool, row: i32, col: i32, ms: i64 } = null,
look_hover_wait: ?look.LookHoverWait = null,
look_hover_preview: ?look.LookHoverPreview = null,
pdf_hover_preview: if (pdf_enabled) ?look.PdfWordPreview else void = if (pdf_enabled) null else {},