aboutsummaryrefslogtreecommitdiff
path: root/modules/textadept/find.lua
diff options
context:
space:
mode:
authormitchell <70453897+orbitalquark@users.noreply.github.com>2020-09-10 23:27:40 -0400
committermitchell <70453897+orbitalquark@users.noreply.github.com>2020-09-10 23:27:40 -0400
commitf13b1bbde296c839c4b2fc3081a461cb5590f82c (patch)
tree187b70b6954ced2cd0f5ae16406a89ab7a9c426f /modules/textadept/find.lua
parent0a37ea128d8d33af8db4fa2d6df9d0aa5d9ca801 (diff)
downloadtextadept-f13b1bbde296c839c4b2fc3081a461cb5590f82c.tar.gz
textadept-f13b1bbde296c839c4b2fc3081a461cb5590f82c.zip
Fixed error reporting the number of zero-length find results.
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 d5e34ca9..84590c32 100644
--- a/modules/textadept/find.lua
+++ b/modules/textadept/find.lua
@@ -235,7 +235,7 @@ local function find(text, next, flags, no_wrap, wrapped)
buffer:target_whole_document()
while buffer:search_in_target(text) ~= -1 do
local s, e = buffer.target_start, buffer.target_end
- if s == e then break end -- prevent loops
+ if s == e then e = e + 1 end -- prevent loops for zero-length results
if M.highlight_all_matches and e - s > 1 then
buffer:indicator_fill_range(s, e - s)
end