diff options
author | 2020-10-20 15:29:03 -0400 | |
---|---|---|
committer | 2020-10-20 15:29:03 -0400 | |
commit | 03c4016d07477781aa3adcc9edf340c0bec9c6c8 (patch) | |
tree | d3be089e9020807326a4e56562876ecb7bcf7892 /modules/textadept/file_types.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 'modules/textadept/file_types.lua')
-rw-r--r-- | modules/textadept/file_types.lua | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/textadept/file_types.lua b/modules/textadept/file_types.lua index 4bf00465..37743fbd 100644 --- a/modules/textadept/file_types.lua +++ b/modules/textadept/file_types.lua @@ -93,13 +93,13 @@ events.connect(events.VIEW_AFTER_SWITCH, restore_lexer) events.connect(events.VIEW_NEW, restore_lexer) events.connect(events.RESET_AFTER, restore_lexer) +local LEXERNAMES = _SCINTILLA.functions.property_names[1] --- -- Prompts the user to select a lexer for the current buffer. -- @see buffer.set_lexer -- @name select_lexer function M.select_lexer() local lexers = {} - local LEXERNAMES = _SCINTILLA.functions.property_names[1] for name in buffer:private_lexer_call(LEXERNAMES):gmatch('[^\n]+') do lexers[#lexers + 1] = name end |