Fix listview redraw missing x in setCursorPos

This commit is contained in:
Ben 2024-06-02 02:02:47 +02:00
parent e0ec33e387
commit 9b3c145438
Signed by: ben
GPG key ID: 0F54A7ED232D3319

View file

@ -15,7 +15,7 @@ end
local function redrawLine(idx) local function redrawLine(idx)
local tw, th = frame.getSize() local tw, th = frame.getSize()
if idx >= paginationOffset and idx-paginationOffset <= th then if idx >= paginationOffset and idx-paginationOffset <= th then
frame.setCursorPos(1,idx-paginationOffset+1) frame.setCursorPos(1, idx-paginationOffset+1)
frame.setBackgroundColor(colors.red) frame.setBackgroundColor(colors.red)
frame.clearLine() frame.clearLine()
frame.setBackgroundColor(colors.black) frame.setBackgroundColor(colors.black)
@ -55,7 +55,7 @@ local function redraw()
local backingIdx = paginationOffset local backingIdx = paginationOffset
for idx = 1, th, 1 do for idx = 1, th, 1 do
if backingList[backingIdx] ~= nil then if backingList[backingIdx] ~= nil then
frame.setCursorPos(idx) frame.setCursorPos(1, idx)
drawLine(frame, backingList[backingIdx]) drawLine(frame, backingList[backingIdx])
end end
end end