From f13b1bbde296c839c4b2fc3081a461cb5590f82c Mon Sep 17 00:00:00 2001 From: mitchell <70453897+orbitalquark@users.noreply.github.com> Date: Thu, 10 Sep 2020 23:27:40 -0400 Subject: Fixed error reporting the number of zero-length find results. --- modules/textadept/find.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules') 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 -- cgit v1.2.3