fix: bad clear
This commit is contained in:
@@ -270,6 +270,9 @@ function drawLogs(x0, y0, x1, y1)
|
|||||||
|
|
||||||
local currentY = y1 - drawnLines
|
local currentY = y1 - drawnLines
|
||||||
term.setCursorPos(1, currentY)
|
term.setCursorPos(1, currentY)
|
||||||
|
|
||||||
|
term.setBackgroundColor(messageBG)
|
||||||
|
term.clearLine()
|
||||||
|
|
||||||
if lineIdx == 1 then
|
if lineIdx == 1 then
|
||||||
term.setBackgroundColor(format.BG)
|
term.setBackgroundColor(format.BG)
|
||||||
@@ -280,16 +283,12 @@ function drawLogs(x0, y0, x1, y1)
|
|||||||
term.setTextColor(messageFG)
|
term.setTextColor(messageFG)
|
||||||
term.write(line)
|
term.write(line)
|
||||||
else
|
else
|
||||||
|
|
||||||
term.setBackgroundColor(messageBG)
|
term.setBackgroundColor(messageBG)
|
||||||
term.setTextColor(messageFG)
|
term.setTextColor(messageFG)
|
||||||
term.write((" "):rep(prefixLength))
|
term.write((" "):rep(prefixLength))
|
||||||
term.write(line)
|
term.write(line)
|
||||||
end
|
end
|
||||||
|
|
||||||
term.setBackgroundColor(messageBG)
|
|
||||||
term.setCursorPos(1 + prefixLength + #line, currentY)
|
|
||||||
term.clearLine()
|
|
||||||
|
|
||||||
drawnLines = drawnLines + 1
|
drawnLines = drawnLines + 1
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user