fix: wrong check again
This commit is contained in:
@@ -238,8 +238,9 @@ function updateScreen()
|
|||||||
|
|
||||||
-- logs
|
-- logs
|
||||||
local function drawLogs(startY, endY)
|
local function drawLogs(startY, endY)
|
||||||
|
local drawnLines = 0
|
||||||
for i = #log.buffer, 1, -1 do
|
for i = #log.buffer, 1, -1 do
|
||||||
if i > endY - startY then break end
|
if drawnLines > endY - startY then break end
|
||||||
|
|
||||||
local entry = log.buffer[i]
|
local entry = log.buffer[i]
|
||||||
local format = logTypes[entry.type]
|
local format = logTypes[entry.type]
|
||||||
@@ -262,6 +263,8 @@ function updateScreen()
|
|||||||
term.setTextColour(prevColourFg)
|
term.setTextColour(prevColourFg)
|
||||||
term.write((" %s\n"):format(entry.message))
|
term.write((" %s\n"):format(entry.message))
|
||||||
end
|
end
|
||||||
|
|
||||||
|
drawnLines = drawnLines + 1
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user