aboutsummaryrefslogtreecommitdiff
path: root/core/events.lua
diff options
context:
space:
mode:
Diffstat (limited to 'core/events.lua')
-rw-r--r--core/events.lua8
1 files changed, 3 insertions, 5 deletions
diff --git a/core/events.lua b/core/events.lua
index fec8d4b9..8a2f86b8 100644
--- a/core/events.lua
+++ b/core/events.lua
@@ -65,8 +65,7 @@ module('textadept.events', package.seeall)
-- shift: flag indicating whether or not shift is pressed.
-- control: flag indicating whether or not control is pressed.
-- alt: flag indicating whether or not alt is pressed.
--- menu_clicked(menu_item, menu_id)
--- menu_item: text of the menu item clicked.
+-- menu_clicked(menu_id)
-- menu_id: the numeric ID of the menu item.
local events = textadept.events
@@ -138,9 +137,8 @@ end
function keypress(code, shift, control, alt)
return handle('keypress', code, shift, control, alt)
end
-function menu_clicked(menu_item)
- local text, menu_id = menu_item:match('^(.+)|(%d+)$')
- return handle('menu_clicked', text, tonumber(menu_id))
+function menu_clicked(menu_id_str)
+ return handle('menu_clicked', tonumber(menu_id_str))
end
-- Scintilla notifications.