diff options
Diffstat (limited to 'modules/textadept/snippets.lua')
-rw-r--r-- | modules/textadept/snippets.lua | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/modules/textadept/snippets.lua b/modules/textadept/snippets.lua index 2c2bbf15..5c039d12 100644 --- a/modules/textadept/snippets.lua +++ b/modules/textadept/snippets.lua @@ -530,7 +530,8 @@ M._snippet_mt = { -- Update snippet transforms when text is added or deleted. events.connect(events.UPDATE_UI, function(updated) - if #snippet_stack > 0 and bit32.band(updated, buffer.UPDATE_CONTENT) > 0 then + if #snippet_stack > 0 and updated and + bit32.band(updated, buffer.UPDATE_CONTENT) > 0 then snippet_stack[#snippet_stack]:update_transforms() end end) |