34ac83b594
Introduce separate mouse release and mouse drag (move while pressed) events: MouseLeftRelease, MouseLeftDrag, MouseRightRelease etc, to allow binding them to actions independently from mouse press events (MouseLeft, MouseRight etc). This change: - Makes it possible to handle mouse release and drag for arbitrary mouse events and actions (including Lua actions), not just for MouseLeft as in the current code. - Fixes issue #2599 with PastePrimary and MouseMultiCursor actions: selection is pasted not only when pressing MouseMiddle but also when moving mouse with MouseMiddle pressed; similarly, a new multicursor is added not only when pressing Ctrl-MouseLeft but also when moving mouse with Ctrl-MouseLeft pressed. My initial approach was not to introduce new events for mouse release and mouse drag but to pass "mouse released" info to action functions in addition to *tcell.EventMouse to let the action functions do the necessary checks (similarly to what MousePress is already doing). But then I realized it was a bad idea, since we still want to be able also to bind mouse events to regular key actions (such as PastePrimary) which don't care about mouse event info. |
||
---|---|---|
.. | ||
actions.go | ||
actions_other.go | ||
actions_posix.go | ||
bindings.go | ||
bufpane.go | ||
command.go | ||
defaults.go | ||
defaults_darwin.go | ||
defaults_other.go | ||
events.go | ||
globals.go | ||
infocomplete.go | ||
infopane.go | ||
keytree.go | ||
pane.go | ||
rawpane.go | ||
tab.go | ||
terminal_supported.go | ||
terminal_unsupported.go | ||
termpane.go |