scroll: Fix scroll-up

This commit is contained in:
Emmanuel Lepage Vallee 2016-06-28 17:58:25 -04:00
parent 5c05c431e7
commit 84f19c51a1
1 changed files with 7 additions and 1 deletions

View File

@ -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