diff options
author | mitchell <70453897+orbitalquark@users.noreply.github.com> | 2021-12-14 10:08:09 -0500 |
---|---|---|
committer | mitchell <70453897+orbitalquark@users.noreply.github.com> | 2021-12-14 10:08:09 -0500 |
commit | 9a91848fc752a364f16724f564288bcc20d6a63a (patch) | |
tree | 52ac624111cf79a0f0fc2be5ccd334b49e2d4937 | |
parent | 0f9d6f917173b1a22559fc42d12bbfc9bf4e783c (diff) |
Propagate Tab key to insert \t if necessary for previous commit.
-rw-r--r-- | modules/textadept/snippets.lua | 2 | ||||
-rw-r--r-- | test/test.lua | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/modules/textadept/snippets.lua b/modules/textadept/snippets.lua index d16b2ae7..cc423462 100644 --- a/modules/textadept/snippets.lua +++ b/modules/textadept/snippets.lua @@ -561,7 +561,7 @@ function M.insert(text) local trigger if not assert_type(text, 'string/nil', 1) then trigger, text = find_snippet() - if type(text) == 'table' then return end -- assume lexer table and ignore + if type(text) == 'table' then return false end -- assume lexer table and ignore if type(text) == 'function' then text = text() end assert_type(text, 'string/nil', trigger or '?') end diff --git a/test/test.lua b/test/test.lua index a8c25164..ae1b052b 100644 --- a/test/test.lua +++ b/test/test.lua @@ -3494,10 +3494,10 @@ function test_snippets_find_snippet() table.remove(textadept.snippets.paths, 1) end -function test_snippets_expand_lexer_name() +function test_snippets_no_expand_lexer_name() buffer.new() buffer:add_text('lua') - assert(textadept.snippets.insert() == nil, 'snippet not inserted') + assert(textadept.snippets.insert() == false, 'snippet not inserted') buffer:close(true) end |