aboutsummaryrefslogtreecommitdiff
path: root/core/events.lua
diff options
context:
space:
mode:
authormitchell <70453897+667e-11@users.noreply.github.com>2019-11-07 12:44:46 -0500
committermitchell <70453897+667e-11@users.noreply.github.com>2019-11-07 12:44:46 -0500
commitd62646466f616b992029c92a3f6dd1ebac61d116 (patch)
treeabb89200cb752b868f2f2a031c1b73c9382f9519 /core/events.lua
parent04d8fc19704896bf86e550db023d7c04a8d4442e (diff)
downloadtextadept-d62646466f616b992029c92a3f6dd1ebac61d116.tar.gz
textadept-d62646466f616b992029c92a3f6dd1ebac61d116.zip
Changed `events.TAB_CLICKED` to emit button clicked as well as modifier keys.
This allows users to close buffers on middle-click for example.
Diffstat (limited to 'core/events.lua')
-rw-r--r--core/events.lua8
1 files changed, 8 insertions, 0 deletions
diff --git a/core/events.lua b/core/events.lua
index edd7258b..768f41e0 100644
--- a/core/events.lua
+++ b/core/events.lua
@@ -243,9 +243,17 @@ local M = {}
-- Emitted when the user clicks on a buffer tab.
-- When connecting to this event, connect with an index of 1 if the handler
-- needs to run before Textadept switches between buffers.
+-- Note that Textadept always displays a context menu on right-click.
-- Arguments:
--
+-- * _`button`_: The mouse button number that was clicked, either `1` (left
+-- button), `2` (middle button), `3` (right button), `4` (wheel up), or `5`
+-- (wheel down).
-- * _`index`_: The numeric index of the clicked tab.
+-- * _`shift`_: The "Shift" modifier key is held down.
+-- * _`ctrl`_: The "Control" modifier key is held down.
+-- * _`alt`_: The "Alt"/"Option" modifier key is held down.
+-- * _`meta`_: The "Command" modifier key on Mac OSX is held down.
-- @field UPDATE_UI (string)
-- Emitted after the view is visually updated.
-- Arguments: