aboutsummaryrefslogtreecommitdiff
path: root/modules/textadept/find.lua
diff options
context:
space:
mode:
authormitchell <70453897+667e-11@users.noreply.github.com>2019-11-22 09:31:50 -0500
committermitchell <70453897+667e-11@users.noreply.github.com>2019-11-22 09:31:50 -0500
commitea04a3c09a143fc5405556aa766423468e27fe57 (patch)
tree960a7b71653e5dfa4fea6526ce94712295859c1b /modules/textadept/find.lua
parent7ba33bd25ebd4660859aaf68f87d377e94aba69c (diff)
downloadtextadept-ea04a3c09a143fc5405556aa766423468e27fe57.tar.gz
textadept-ea04a3c09a143fc5405556aa766423468e27fe57.zip
Fixed bug in "Replace All in selection" with a match at the end of a selection.
Diffstat (limited to 'modules/textadept/find.lua')
-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 120abae5..7a26296c 100644
--- a/modules/textadept/find.lua
+++ b/modules/textadept/find.lua
@@ -362,7 +362,7 @@ events.connect(events.REPLACE_ALL, function(ftext, rtext)
buffer.search_flags = get_flags()
buffer:set_target_range(not replace_in_sel and 0 or s, buffer.length)
while buffer:search_in_target(ftext) ~= -1 and (not replace_in_sel or
- buffer.target_end < buffer:indicator_end(INDIC_REPLACE, s) or EOF) do
+ buffer.target_end <= buffer:indicator_end(INDIC_REPLACE, s) or EOF) do
if buffer.target_start == buffer.target_end then break end -- prevent loops
buffer_replace_target(buffer, rtext)
count = count + 1