Fix display tab methods using static offset

This commit is contained in:
Ben 2024-06-01 16:45:34 +02:00
parent 6c54f462db
commit 2a0176888a
Signed by: ben
GPG key ID: 0F54A7ED232D3319
2 changed files with 2 additions and 2 deletions

View file

@ -35,7 +35,7 @@ local function displayTab(self)
local tw,th = self.window.getSize()
for i, val in pairs(orders) do
local line_num = (i-self.scrollPos)*2+1
if line_num > 2 and line_num < th-1 then
if line_num > 0 and line_num < th-1 then
self.window.setTextColor(colors.lightGray)
self.window.setCursorPos(1,line_num)
self.window.write(val.id)

View file

@ -51,7 +51,7 @@ local function displayTab(self)
display_list = {}
for i, val in pairs(requests) do
local line_num = i-self.scrollPos+1
if line_num > 2 and line_num < th then
if line_num > 0 and line_num < th then
self.window.setTextColor(colors.white)
self.window.setCursorPos(1,line_num)
self.window.write(val.req.name)