Skip to content

Commit 0694cd2

Browse files
committed
help: Document passing *tcell.EventMouse to mouse action callbacks
1 parent c267c7c commit 0694cd2

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

runtime/help/plugins.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,10 +76,19 @@ that micro defines:
7676
chained with other actions (see `> help keybindings`) to determine whether
7777
the next actions in the chain should be executed or not.
7878

79+
If the action is a mouse action, e.g. `MousePress`, the mouse event info
80+
is passed to the callback as an extra argument of type `*tcell.EventMouse`.
81+
See https://pkg.go.dev/github.com/micro-editor/tcell/v2#EventMouse for the
82+
description of this type and its methods.
83+
7984
* `preAction(bufpane)`: runs immediately before `Action` is triggered
8085
by the user. Returns a boolean which defines whether the action should
8186
be canceled.
8287

88+
Similarly to `onAction`, if the action is a mouse action, the mouse event
89+
info is passed to the callback as an extra argument of type
90+
`*tcell.EventMouse`.
91+
8392
* `onRune(bufpane, rune)`: runs when the composed rune has been inserted
8493

8594
* `preRune(bufpane, rune)`: runs before the composed rune will be inserted

0 commit comments

Comments
 (0)