aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormitchell <70453897+667e-11@users.noreply.github.com>2016-04-10 16:59:10 -0400
committermitchell <70453897+667e-11@users.noreply.github.com>2016-04-10 16:59:10 -0400
commit6418cd5a414d8c41a218550e1b997114e5e0a741 (patch)
treef586a7c88318bdfed789560576b5bc5bb560b88c
parentad837af2486fc3c79ab23129bf2a61f517d4e6b2 (diff)
downloadtextadept-6418cd5a414d8c41a218550e1b997114e5e0a741.tar.gz
textadept-6418cd5a414d8c41a218550e1b997114e5e0a741.zip
Fixed "replace within selection" edge case; modules/textadept/find.lua
Do not match one character past the end of the selection.
-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 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)