From 84f19c51a13113fc7e70039cf935d7088e333e3b Mon Sep 17 00:00:00 2001 From: Emmanuel Lepage Vallee Date: Tue, 28 Jun 2016 17:58:25 -0400 Subject: [PATCH] scroll: Fix scroll-up --- base.lua | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/base.lua b/base.lua index 3971f97..1599ab4 100644 --- a/base.lua +++ b/base.lua @@ -75,6 +75,8 @@ local function filter(data) local start_at, visible_counter = data._start_at or -1, 0 + local exit_soon = false + -- There is 2 factors to consider to display the item: -- -- * Is the item within range @@ -92,7 +94,11 @@ local function filter(data) end -- Don't waste CPU - if visible_counter >= max_items then break end + if visible_counter >= max_items then + if exit_soon then break end + + exit_soon = true + end end end