Don't auto-relocate mouse events

This commit is contained in:
Zachary Yedidia
2020-08-12 01:18:15 -04:00
parent 352f57cf11
commit 6b80870dfd
2 changed files with 2 additions and 3 deletions

View File

@@ -92,6 +92,7 @@ func (h *BufPane) MousePress(e *tcell.EventMouse) bool {
h.Cursor.StoreVisualX()
h.lastLoc = mouseLoc
h.Relocate()
return true
}

View 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
}