]> git.lizzy.rs Git - micro.git/commitdiff
Don't auto-relocate mouse events
authorZachary Yedidia <zyedidia@gmail.com>
Wed, 12 Aug 2020 05:18:15 +0000 (01:18 -0400)
committerZachary Yedidia <zyedidia@gmail.com>
Wed, 12 Aug 2020 05:18:15 +0000 (01:18 -0400)
internal/action/actions.go
internal/action/bufpane.go

index e7470056a3661804292fdf3b1899b24dd0478f63..b80ff67ba16411b9a7c465933f8b75c80203e389 100644 (file)
@@ -92,6 +92,7 @@ func (h *BufPane) MousePress(e *tcell.EventMouse) bool {
 
        h.Cursor.StoreVisualX()
        h.lastLoc = mouseLoc
+       h.Relocate()
        return true
 }
 
index 44a07f96d9a731fadd9549a9839ba3fbd13e4a86..9f35df1b29e45995db442a5fea8ed9702d33acbf 100644 (file)
@@ -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
        }