diff options
Diffstat (limited to 'modules')
-rw-r--r-- | modules/textadept/snippets.lua | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/modules/textadept/snippets.lua b/modules/textadept/snippets.lua index af7819b9..2c2bbf15 100644 --- a/modules/textadept/snippets.lua +++ b/modules/textadept/snippets.lua @@ -207,7 +207,9 @@ local function new_snippet(text, trigger) placeholder.id = #snapshot.placeholders + 1 snapshot.placeholders[#snapshot.placeholders + 1] = placeholder end - if text_part ~= '' then snapshot.text = snapshot.text..text_part end + if text_part ~= '' then + snapshot.text = snapshot.text..text_part:gsub('%%(%p)', '%1') + end placeholder.position = #snapshot.text if placeholder.default then -- Execute any embedded code first. |