From ec471a5bc274353a1e880f6aa46b57bcc9fb2fcd Mon Sep 17 00:00:00 2001 From: Junegunn Choi Date: Tue, 3 Jan 2023 01:36:51 +0900 Subject: [PATCH] Make sure two consecutive double clicks require four clicks --- src/tui/light.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/tui/light.go b/src/tui/light.go index ec5cf334..46a279c5 100644 --- a/src/tui/light.go +++ b/src/tui/light.go @@ -591,6 +591,9 @@ func (r *LightRenderer) mouseSequence(sz *int) Event { if len(r.clicks) > 1 && r.clicks[0][0] == r.clicks[1][0] && r.clicks[0][1] == r.clicks[1][1] && time.Since(r.prevDownTime) < doubleClickDuration { double = true + if double { + r.clicks = [][2]int{} + } } } return Event{Mouse, 0, &MouseEvent{y, x, 0, left, down, double, mod}}