From 6418cd5a414d8c41a218550e1b997114e5e0a741 Mon Sep 17 00:00:00 2001 From: mitchell <70453897+667e-11@users.noreply.github.com> Date: Sun, 10 Apr 2016 16:59:10 -0400 Subject: Fixed "replace within selection" edge case; modules/textadept/find.lua Do not match one character past the end of the selection. --- modules/textadept/find.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules/textadept') diff --git a/modules/textadept/find.lua b/modules/textadept/find.lua index 7c126e0b..6fab6fc2 100644 --- a/modules/textadept/find.lua +++ b/modules/textadept/find.lua @@ -363,7 +363,7 @@ local function replace_all(ftext, rtext) buffer:indicator_fill_range(e, 1) buffer:goto_pos(s) local pos = find(ftext, true, nil, true) - while pos ~= -1 and pos <= buffer:indicator_end(INDIC_REPLACE, s) do + while pos ~= -1 and pos < buffer:indicator_end(INDIC_REPLACE, s) do replace(rtext) count = count + 1 pos = find(ftext, true, nil, true) -- cgit v1.2.3