diff options
author | 2020-09-10 23:27:40 -0400 | |
---|---|---|
committer | 2020-09-10 23:27:40 -0400 | |
commit | f13b1bbde296c839c4b2fc3081a461cb5590f82c (patch) | |
tree | 187b70b6954ced2cd0f5ae16406a89ab7a9c426f | |
parent | 0a37ea128d8d33af8db4fa2d6df9d0aa5d9ca801 (diff) | |
download | textadept-f13b1bbde296c839c4b2fc3081a461cb5590f82c.tar.gz textadept-f13b1bbde296c839c4b2fc3081a461cb5590f82c.zip |
Fixed error reporting the number of zero-length find results.
-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 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 |