diff options
author | 2015-12-23 20:18:21 -0500 | |
---|---|---|
committer | 2015-12-23 20:18:21 -0500 | |
commit | 66dfea2c01a182ff40887142ae4e0675e428aef0 (patch) | |
tree | 1d268a924c5067fd9bc49c4471ecbc95518b107e | |
parent | 9e4e226aab06ed48025cb3e655a47b348416ea81 (diff) | |
download | textadept-66dfea2c01a182ff40887142ae4e0675e428aef0.tar.gz textadept-66dfea2c01a182ff40887142ae4e0675e428aef0.zip |
Attempted fix for edge-case state inconsistency in snippets.
-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 1584dc13..d1adfe58 100644 --- a/modules/textadept/snippets.lua +++ b/modules/textadept/snippets.lua @@ -386,7 +386,7 @@ M._snippet_mt = { if buffer:auto_c_active() then buffer:auto_c_complete() end -- Take a snapshot of the current state in order to restore it later if -- necessary. - if self.index > 0 then + if self.index > 0 and self.start_pos < self.end_pos then local text = buffer:text_range(self.start_pos, self.end_pos) local placeholders = {} for pos, ph in self:each_placeholder() do |