Skip to content

Commit 7861b00

Browse files
committed
Pass mouse info to {on,pre}MouseXXX callbacks
Pass *tcell.EventMouse to action callbacks for "mouse actions", i.e. to onMousePress, preMouseDrag and so on, similarly to how we pass it to lua functions bound to mouse events.
1 parent 54ba3cd commit 7861b00

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

internal/action/bufpane.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -566,7 +566,7 @@ func (h *BufPane) execAction(action BufAction, name string, te *tcell.EventMouse
566566
h.Buf.HasSuggestions = false
567567
}
568568

569-
if !h.PluginCB("pre" + name) {
569+
if !h.PluginCB("pre"+name, te) {
570570
return false
571571
}
572572

@@ -577,7 +577,7 @@ func (h *BufPane) execAction(action BufAction, name string, te *tcell.EventMouse
577577
case BufMouseAction:
578578
success = a(h, te)
579579
}
580-
success = success && h.PluginCB("on"+name)
580+
success = success && h.PluginCB("on"+name, te)
581581

582582
if _, ok := MultiActions[name]; ok {
583583
if recordingMacro {

0 commit comments

Comments
 (0)