From 69c46537c92d39fce84ff5a85e4e0e3995770389 Mon Sep 17 00:00:00 2001 From: mitchell <70453897+667e-11@users.noreply.github.com> Date: Tue, 4 Oct 2011 20:48:44 -0400 Subject: Fixed bug with %n in replace introduced by r960; modules/textadept/find.lua --- modules/textadept/find.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) -- cgit v1.2.3