diff options
author | 2020-10-20 15:29:03 -0400 | |
---|---|---|
committer | 2020-10-20 15:29:03 -0400 | |
commit | 03c4016d07477781aa3adcc9edf340c0bec9c6c8 (patch) | |
tree | d3be089e9020807326a4e56562876ecb7bcf7892 /core/events.lua | |
parent | b682fbd4a6e53185e2556686079532ad0e42be94 (diff) | |
download | textadept-03c4016d07477781aa3adcc9edf340c0bec9c6c8.tar.gz textadept-03c4016d07477781aa3adcc9edf340c0bec9c6c8.zip |
Code cleanup.
Of note:
* io.save_all_files() does not visit each buffer to save anymore. An unintended
side-effect was checking for outside modification (but only if the file itself
was modified), so outside changes will always be saved over now.
* The menu clicked handler uses assert_type(), so the 'Unknown command'
localization is no longer needed.
* When printing to a new buffer type would split the view, use an existing split
view when possible.
* Prefer 'goto continue' construct in loops over nested 'if's.
* Fixed clearing of ui.find.replace_entry_text on reset in the GUI version.
* Fixed lack of statusbar updating when setting options like buffer EOL mode,
indentation, and encoding.
* Renamed internal new_snippet() to new() and put it in the snippet metatable.
Diffstat (limited to 'core/events.lua')
-rw-r--r-- | core/events.lua | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/core/events.lua b/core/events.lua index 7282172d..1c146145 100644 --- a/core/events.lua +++ b/core/events.lua @@ -391,11 +391,10 @@ end -- Handles Scintilla notifications. M.connect('SCN', function(notification) - local f = _SCINTILLA.events[notification.code] - if not f then return end + local iface = _SCINTILLA.events[notification.code] local args = {} - for i = 2, #f do args[i - 1] = notification[f[i]] end - return M.emit(f[1], table.unpack(args)) + for i = 2, #iface do args[i - 1] = notification[iface[i]] end + return M.emit(iface[1], table.unpack(args)) end) -- Set event constants. |