diff options
author | 2016-04-10 16:59:10 -0400 | |
---|---|---|
committer | 2016-04-10 16:59:10 -0400 | |
commit | 6418cd5a414d8c41a218550e1b997114e5e0a741 (patch) | |
tree | f586a7c88318bdfed789560576b5bc5bb560b88c /modules | |
parent | ad837af2486fc3c79ab23129bf2a61f517d4e6b2 (diff) | |
download | textadept-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.
Diffstat (limited to 'modules')
-rw-r--r-- | modules/textadept/find.lua | 2 |
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) |