fix: correct prefix space
This commit is contained in:
@@ -248,7 +248,7 @@ function drawLogs(x0, y0, x1, y1)
|
|||||||
term.setBackgroundColor(format["BG"])
|
term.setBackgroundColor(format["BG"])
|
||||||
term.setTextColor(format["FG"])
|
term.setTextColor(format["FG"])
|
||||||
|
|
||||||
local prefix = ("[%s] "):format(entry.type)
|
local prefix = ("[%s]"):format(entry.type)
|
||||||
local prefixLength = #prefix
|
local prefixLength = #prefix
|
||||||
local maxMessageWidth = w - prefixLength
|
local maxMessageWidth = w - prefixLength
|
||||||
|
|
||||||
@@ -270,7 +270,7 @@ 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.setBackgroundColor(messageBG)
|
||||||
term.clearLine()
|
term.clearLine()
|
||||||
|
|
||||||
@@ -285,7 +285,7 @@ function drawLogs(x0, y0, x1, y1)
|
|||||||
else
|
else
|
||||||
term.setBackgroundColor(messageBG)
|
term.setBackgroundColor(messageBG)
|
||||||
term.setTextColor(messageFG)
|
term.setTextColor(messageFG)
|
||||||
term.write((" "):rep(prefixLength))
|
term.write((" "):rep(prefixLength + 1))
|
||||||
term.write(line)
|
term.write(line)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user