aboutsummaryrefslogtreecommitdiff
path: root/core/ext/find.lua
diff options
context:
space:
mode:
authormitchell <70453897+667e-11@users.noreply.github.com>2008-06-24 15:48:33 -0400
committermitchell <70453897+667e-11@users.noreply.github.com>2008-06-24 15:48:33 -0400
commit45a1f776e3c8432003e7b54432c0cbf45ec84259 (patch)
treefa323fdadcde37066156fc88d71c524eb984cfe1 /core/ext/find.lua
parent0f91b311be2d598d38a66982f619432dfe61bc70 (diff)
downloadtextadept-45a1f776e3c8432003e7b54432c0cbf45ec84259.tar.gz
textadept-45a1f776e3c8432003e7b54432c0cbf45ec84259.zip
Fixed bug with '%' in selected text for replacing; core/ext/find.lua
Diffstat (limited to 'core/ext/find.lua')
-rw-r--r--core/ext/find.lua1
1 files changed, 1 insertions, 0 deletions
diff --git a/core/ext/find.lua b/core/ext/find.lua
index 8617c274..e0491cd8 100644
--- a/core/ext/find.lua
+++ b/core/ext/find.lua
@@ -89,6 +89,7 @@ function find.replace(rtext)
rtext = rtext:gsub('%%%%', '\\037') -- escape '%%'
if find.captures then
for i, v in ipairs(find.captures) do
+ v = v:gsub('%%', '%%%%') -- escape '%' for gsub
rtext = rtext:gsub('%%'..i, v)
end
end