From b08322345b33abcee114c05c85fa4c46c10f4701 Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Mon, 28 Sep 2026 19:20:20 -0300 Subject: 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 --- src/pardes.zig | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/pardes.zig') 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 {}, -- cgit v1.3