diff options
author | 2020-03-10 11:19:00 -0400 | |
---|---|---|
committer | 2020-03-10 11:19:00 -0400 | |
commit | ff6fbbc3227b49fc5407ddbcc7a3f7dac6993482 (patch) | |
tree | cd83d4e5b9919c4987272397a70146e182148a87 /core/events.lua | |
parent | 610bfcc47679ec6b9abb15b6a1cf6087be904369 (diff) | |
download | textadept-ff6fbbc3227b49fc5407ddbcc7a3f7dac6993482.tar.gz textadept-ff6fbbc3227b49fc5407ddbcc7a3f7dac6993482.zip |
Core code cleanup, reformat, refactoring, and bugfixes.
`events.FILE_CHANGED` was not emitting a filename.
Added tests for key commands, keychains, and key modes.
Diffstat (limited to 'core/events.lua')
-rw-r--r-- | core/events.lua | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/core/events.lua b/core/events.lua index 438bb5bf..0cbd8f2f 100644 --- a/core/events.lua +++ b/core/events.lua @@ -294,6 +294,10 @@ local M = {} -- Emitted by [`buffer.zoom_in()`]() and [`buffer.zoom_out()`](). module('events')]] +-- Map of event names to tables of handler functions. +-- Handler tables are auto-created as needed. +-- @class table +-- @name handlers local handlers = setmetatable({}, {__index = function(t, k) t[k] = {} return t[k] @@ -377,7 +381,7 @@ end) -- Set event constants. for _, v in pairs(_SCINTILLA.events) do M[v[1]:upper()] = v[1] end -local textadept_events = { +local textadept_events = { -- defined in C 'appleevent_odoc', 'buffer_after_switch', 'buffer_before_switch', 'buffer_deleted', 'buffer_new', 'csi', 'error', 'find', 'focus', 'initialized', 'keypress', 'menu_clicked', 'mouse', 'quit', 'replace', |