aboutsummaryrefslogtreecommitdiff
path: root/modules/textadept/snippets.lua
diff options
context:
space:
mode:
Diffstat (limited to 'modules/textadept/snippets.lua')
-rwxr-xr-xmodules/textadept/snippets.lua12
1 files changed, 7 insertions, 5 deletions
diff --git a/modules/textadept/snippets.lua b/modules/textadept/snippets.lua
index 6ea39563..4d426532 100755
--- a/modules/textadept/snippets.lua
+++ b/modules/textadept/snippets.lua
@@ -270,11 +270,13 @@ local function next_tab_stop()
-- Place additional carets at mirrors.
local _, _, text = snippet_info()
text = text:gsub('(%%%d+%b())',
- function(mirror)
- -- Lua code in replacement mirrors may contain '%' sequences; do not
- -- treat as mirrors
- if mirror:find('|') then return string.rep('_', #mirror) end
- end)
+ function(mirror)
+ -- Lua code in replacement mirrors may contain '%'
+ -- sequences; do not treat as mirrors
+ if mirror:find('|') then
+ return string.rep('_', #mirror)
+ end
+ end)
for s, e in text:gmatch('()%%'..index..'()[^(]') do
buffer:add_selection(s_start + s - 1, s_start + e - 1)
end