diff options
author | 2020-03-07 20:50:40 -0500 | |
---|---|---|
committer | 2020-03-07 20:50:40 -0500 | |
commit | ddfcc992b3a0ed79b2b5ea20193ea3665876ac5d (patch) | |
tree | 1580cbe52e59b353467c96364ebcdb592590cc39 /test/test.lua | |
parent | 268923c5f90dcb50bb85b25e84c9a5a995348028 (diff) | |
download | textadept-ddfcc992b3a0ed79b2b5ea20193ea3665876ac5d.tar.gz textadept-ddfcc992b3a0ed79b2b5ea20193ea3665876ac5d.zip |
Ask LPeg lexer which lexers are available instead of searching for them.
Diffstat (limited to 'test/test.lua')
-rw-r--r-- | test/test.lua | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/test/test.lua b/test/test.lua index 3efe9077..72883202 100644 --- a/test/test.lua +++ b/test/test.lua @@ -1696,12 +1696,16 @@ function test_file_types_select_lexer_interactive() end function test_file_types_load_lexers() + local lexers = {} + for name in buffer:private_lexer_call(_SCINTILLA.functions.property_names[1]):gmatch('[^\n]+') do + lexers[#lexers + 1] = name + end print('Loading lexers...') if #_VIEWS > 1 then view:unsplit() end view:goto_buffer(-1) ui.silent_print = true buffer.new() - for _, name in ipairs(textadept.file_types.lexers) do + for _, name in ipairs(lexers) do print('Loading lexer ' .. name) buffer:set_lexer(name) end |