From 6b80870dfd6f1e5cafbd3e21d862213b6fb502c3 Mon Sep 17 00:00:00 2001 From: Zachary Yedidia Date: Wed, 12 Aug 2020 01:18:15 -0400 Subject: [PATCH] Don't auto-relocate mouse events --- internal/action/actions.go | 1 + internal/action/bufpane.go | 4 +--- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/internal/action/actions.go b/internal/action/actions.go index e7470056..b80ff67b 100644 --- a/internal/action/actions.go +++ b/internal/action/actions.go @@ -92,6 +92,7 @@ func (h *BufPane) MousePress(e *tcell.EventMouse) bool { h.Cursor.StoreVisualX() h.lastLoc = mouseLoc + h.Relocate() return true } diff --git a/internal/action/bufpane.go b/internal/action/bufpane.go index 44a07f96..9f35df1b 100644 --- a/internal/action/bufpane.go +++ b/internal/action/bufpane.go @@ -484,9 +484,7 @@ func (h *BufPane) DoMouseEvent(e MouseEvent, te *tcell.EventMouse) bool { binds := h.Bindings() action, _ := binds.NextEvent(e, te) if action != nil { - if action(h) { - h.Relocate() - } + action(h) binds.ResetEvents() return true }