aboutsummaryrefslogtreecommitdiffhomepage
path: root/modules
diff options
context:
space:
mode:
authorGravatar mitchell <70453897+orbitalquark@users.noreply.github.com>2020-10-23 08:45:28 -0400
committerGravatar mitchell <70453897+orbitalquark@users.noreply.github.com>2020-10-23 08:45:28 -0400
commitf7ef5d78d7af2c52543ee81f393630bcebfd0e21 (patch)
treea703a0d04d1e155821cf4050d31f0816f6bdbc31 /modules
parent57871e1b1f05ee2d87c07ed6e1bcb86d753f6a43 (diff)
Small code cleanup.
Diffstat (limited to 'modules')
-rw-r--r--modules/textadept/find.lua3
1 files changed, 1 insertions, 2 deletions
diff --git a/modules/textadept/find.lua b/modules/textadept/find.lua
index 1a31eebd..a7a4a854 100644
--- a/modules/textadept/find.lua
+++ b/modules/textadept/find.lua
@@ -158,7 +158,6 @@ local function is_ff_buf(buf) return buf._type == _L['[Files Found Buffer]'] end
-- Clears highlighted match indicators.
local function clear_highlighted_matches()
- if is_ff_buf(buffer) then return end
buffer.indicator_current = M.INDIC_FIND
buffer:indicator_clear_range(1, buffer.length)
end
@@ -231,7 +230,7 @@ local function find(text, next, flags, no_wrap, wrapped)
-- Count and optionally highlight all found occurrences.
local count, current = 0, 1
- clear_highlighted_matches()
+ if not is_ff_buf(buffer) then clear_highlighted_matches() end
if pos ~= -1 then
buffer.search_flags = flags
buffer:target_whole_document()