From b67a0475c5437f40f5ae265390d5a34472c5b41a Mon Sep 17 00:00:00 2001 From: Chris McDonnell Date: Sat, 6 Dec 2025 20:45:39 -0500 Subject: [PATCH] Prevent many hyperlinks from launching while mouse moving This is reproduced when clicking and dragging over a link, which is a common way that people try to select them to copy --- gui.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gui.go b/gui.go index fac31d83..dac90169 100644 --- a/gui.go +++ b/gui.go @@ -1391,7 +1391,7 @@ func (g *Gui) onKey(ev *GocuiEvent) error { } } - if ev.Key == MouseLeft && !v.Editable && g.openHyperlink != nil { + if ev.Key == MouseLeft && (ev.Mod&ModMotion) == 0 && !v.Editable && g.openHyperlink != nil { if newY >= 0 && newY <= len(v.viewLines)-1 && newX >= 0 && newX <= len(v.viewLines[newY].line)-1 { if link := v.viewLines[newY].line[newX].hyperlink; link != "" { return g.openHyperlink(link, v.name)