diff options
author | 2020-03-22 20:59:02 -0400 | |
---|---|---|
committer | 2020-03-22 20:59:02 -0400 | |
commit | f8fc742043c749768266e6b9d432b4cfeb861b28 (patch) | |
tree | 88d3a4dd64e0dc50e7067ad333daa36f85961085 /modules/textadept/snippets.lua | |
parent | 27f83dd10dceae4998fd16bd73196c8536f6c753 (diff) | |
download | textadept-f8fc742043c749768266e6b9d432b4cfeb861b28.tar.gz textadept-f8fc742043c749768266e6b9d432b4cfeb861b28.zip |
Use the statusbar to indicate an active snippet.
This helps avoid disorienting jumps when the user is not aware a snippet is
still active.
Diffstat (limited to 'modules/textadept/snippets.lua')
-rw-r--r-- | modules/textadept/snippets.lua | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/modules/textadept/snippets.lua b/modules/textadept/snippets.lua index 9e1cc9dd..90617a2d 100644 --- a/modules/textadept/snippets.lua +++ b/modules/textadept/snippets.lua @@ -643,8 +643,11 @@ end -- Update snippet transforms when text is added or deleted. events.connect(events.UPDATE_UI, function(updated) - if #snippet_stack > 0 and updated and updated & buffer.UPDATE_CONTENT > 0 then - snippet_stack[#snippet_stack]:update_transforms() + if #snippet_stack > 0 then + if updated & buffer.UPDATE_CONTENT > 0 then + snippet_stack[#snippet_stack]:update_transforms() + end + if #keys.keychain == 0 then ui.statusbar_text = _L['Snippet active'] end end end) |