diff options
author | 2015-12-29 22:02:47 -0500 | |
---|---|---|
committer | 2015-12-29 22:02:47 -0500 | |
commit | 3834445c779f9bb826c2ca8babfbfc53f7f5a4d0 (patch) | |
tree | 3af5843c26453e72a11714b8b978cf0b5d83528e /modules/textadept | |
parent | 66dfea2c01a182ff40887142ae4e0675e428aef0 (diff) | |
download | textadept-3834445c779f9bb826c2ca8babfbfc53f7f5a4d0.tar.gz textadept-3834445c779f9bb826c2ca8babfbfc53f7f5a4d0.zip |
Fixed bug in restoring state after cancel; modules/textadept/snippets.lua
Diffstat (limited to 'modules/textadept')
-rw-r--r-- | modules/textadept/snippets.lua | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/textadept/snippets.lua b/modules/textadept/snippets.lua index d1adfe58..9b10df84 100644 --- a/modules/textadept/snippets.lua +++ b/modules/textadept/snippets.lua @@ -472,6 +472,7 @@ M._snippet_mt = { -- `true`, the buffer is restored to its state prior to snippet expansion. finish = function(self, canceling) local s, e = self.start_pos, self.end_pos + buffer:delete_range(e, 1) -- clear initial padding space if not canceling then buffer.indicator_current = M.INDIC_PLACEHOLDER buffer:indicator_clear_range(s, e - s) @@ -479,7 +480,6 @@ M._snippet_mt = { buffer:set_sel(s, e) buffer:replace_sel(self.trigger or self.original_sel_text) end - buffer:delete_range(e, 1) -- clear initial padding space snippet_stack[#snippet_stack] = nil end, |