fix: iterate in reverse
This commit is contained in:
@@ -279,7 +279,7 @@ function drawLogs(x0, y0, x1, y1)
|
||||
messageFG = prevColourFg
|
||||
end
|
||||
|
||||
for lineIdx, line in ipairs(wrappedMessage) do
|
||||
for lineIdx=#wrappedMessage,1, -1 do
|
||||
if drawnLines > h then break end
|
||||
|
||||
term.setCursorPos(1, y1 - drawnLines)
|
||||
@@ -295,7 +295,7 @@ function drawLogs(x0, y0, x1, y1)
|
||||
|
||||
term.setBackgroundColor(messageBG)
|
||||
term.setTextColor(messageFG)
|
||||
term.write(line)
|
||||
term.write(wrappedMessage[lineIdx])
|
||||
|
||||
local remaining = w - (prefixLength + #line)
|
||||
if remaining > 0 then
|
||||
|
||||
Reference in New Issue
Block a user