From 603f55dedf16985205918ea5da4293d5b5dce763 Mon Sep 17 00:00:00 2001 From: Simon Hauser Date: Sat, 9 Oct 2021 15:34:22 +0200 Subject: [PATCH] fix: processed count to exclude entries that got ignored in make_entry (#1323) It doesnt make sense to count these. Most likely they were never shown. Example: `man_pages` excludes pages from different sections. So you filter for man pages and end up with like 5 entries and the counter still says 1000. Not a good experience. --- lua/telescope/pickers.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/telescope/pickers.lua b/lua/telescope/pickers.lua index 6b9db5e..1996c38 100644 --- a/lua/telescope/pickers.lua +++ b/lua/telescope/pickers.lua @@ -998,12 +998,12 @@ function Picker:get_result_processor(find_id, prompt, status_updater) return true end - self:_increment "processed" - if not entry or entry.valid == false then return end + self:_increment "processed" + count = count + 1 -- TODO: Probably should asyncify this / cache this / do something because this probably takes