aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--modules/textadept/find.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/textadept/find.lua b/modules/textadept/find.lua
index 989c84c8..d1d75321 100644
--- a/modules/textadept/find.lua
+++ b/modules/textadept/find.lua
@@ -236,7 +236,7 @@ local function replace(rtext)
local captures = find.captures
if captures then
for i = 1, #captures do
- rtext = rtext:gsub('%%'..i, captures[i]:gsub('%%', '%%%%'))
+ rtext = rtext:gsub('%%'..i, (captures[i]:gsub('%%', '%%%%')))
end
end
local ok, rtext = pcall(rtext.gsub, rtext, '%%(%b())', run)