aboutsummaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authormitchell <70453897+667e-11@users.noreply.github.com>2009-07-30 15:23:29 -0400
committermitchell <70453897+667e-11@users.noreply.github.com>2009-07-30 15:23:29 -0400
commitac3c86f0534b638459f2fda53d5fc291a27f8e98 (patch)
tree394f09980b0b11c1735fb53dc0ca12efe63e9fec /modules
parent549b5d2e05a9eb9d04c0dbd01db4069bed032497 (diff)
downloadtextadept-ac3c86f0534b638459f2fda53d5fc291a27f8e98.tar.gz
textadept-ac3c86f0534b638459f2fda53d5fc291a27f8e98.zip
Fixed snippets bug; modules/textadept/lsnippets.lua
Placeholders would not be visited if they appeared after transformations.
Diffstat (limited to 'modules')
-rw-r--r--modules/textadept/lsnippets.lua3
1 files changed, 3 insertions, 0 deletions
diff --git a/modules/textadept/lsnippets.lua b/modules/textadept/lsnippets.lua
index 5eeb14e1..18b1bdf0 100644
--- a/modules/textadept/lsnippets.lua
+++ b/modules/textadept/lsnippets.lua
@@ -277,6 +277,9 @@ function next()
index = index + 1
if index <= snippet.max_index then
local s, e, next_item = s_text:find('%%'..index..'(%b())')
+ while next_item and next_item:find('|') do -- ignore transformation mirrors
+ s, e, next_item = s_text:find('%%'..index..'(%b())', e)
+ end
if next_item and not next_item:find('|') then -- placeholder
buffer.target_start, buffer.target_end = s_start, buffer.length
buffer.search_flags = 0