diff options
| author | 2015-11-12 09:35:33 -0500 | |
|---|---|---|
| committer | 2015-11-12 09:35:33 -0500 | |
| commit | a141b1d13f127dbea0874ccf125df6266da7ae39 (patch) | |
| tree | 7d5113424ef1bf4e5fba1b2014e9229cf0be9a38 | |
| parent | 673fdedc04133e10f96c3b1b3b32c9b8bbc54a5b (diff) | |
| download | textadept-a141b1d13f127dbea0874ccf125df6266da7ae39.tar.gz textadept-a141b1d13f127dbea0874ccf125df6266da7ae39.zip | |
Fixed '%' escape sequences in snippets; modules/textadept/snippets.lua
| -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 bfb43bb9..1584dc13 100644 --- a/modules/textadept/snippets.lua +++ b/modules/textadept/snippets.lua @@ -277,7 +277,9 @@ local function new_snippet(text, trigger) placeholder.position = snippet.start_pos + placeholder.position -- absolute text_part, placeholder, e = patt:match(text, e) 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 snippet.snapshots[0] = snapshot -- Insert the snippet into the buffer and mark its end position. |
