summaryrefslogtreecommitdiff
path: root/lua/browser.lua
diff options
context:
space:
mode:
Diffstat (limited to 'lua/browser.lua')
-rw-r--r--lua/browser.lua6
1 files changed, 4 insertions, 2 deletions
diff --git a/lua/browser.lua b/lua/browser.lua
index 415e5dbb..b9a17af5 100644
--- a/lua/browser.lua
+++ b/lua/browser.lua
@@ -115,13 +115,15 @@ function browser.create(opts)
btn:onevent(lvgl.EVENT.FOCUSED, function()
screen.focused_item = this_item
if screen.last_item - 5 < this_item then
- opts.iterator:next(screen.add_item)
+ screen.add_item(opts.iterator())
end
end)
end
for _ = 1, 8 do
- opts.iterator:next(screen.add_item)
+ local val = opts.iterator()
+ if not val then break end
+ screen.add_item(val)
end
return screen