From ff6fbbc3227b49fc5407ddbcc7a3f7dac6993482 Mon Sep 17 00:00:00 2001 From: mitchell <70453897+667e-11@users.noreply.github.com> Date: Tue, 10 Mar 2020 11:19:00 -0400 Subject: Core code cleanup, reformat, refactoring, and bugfixes. `events.FILE_CHANGED` was not emitting a filename. Added tests for key commands, keychains, and key modes. --- core/events.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'core/events.lua') 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', -- cgit v1.2.3