fix: prefix whitespace

This commit is contained in:
2025-05-08 01:30:57 -03:00
parent 55314b33b2
commit 5022f71398
+2 -1
View File
@@ -264,7 +264,7 @@ function drawLogs(x0, y0, x1, y1)
local prevColourBg = term.getBackgroundColour() local prevColourBg = term.getBackgroundColour()
local prevColourFg = term.getTextColour() local prevColourFg = term.getTextColour()
local prefix = ("[%s] "):format(entry.type) local prefix = ("[%s]"):format(entry.type)
local prefixLength = #prefix local prefixLength = #prefix
local maxMessageWidth = math.max(1, w - prefixLength) local maxMessageWidth = math.max(1, w - prefixLength)
@@ -297,6 +297,7 @@ function drawLogs(x0, y0, x1, y1)
term.setBackgroundColor(messageBG) term.setBackgroundColor(messageBG)
term.setTextColor(messageFG) term.setTextColor(messageFG)
term.write(" ")
term.write(line) term.write(line)
local remaining = w - (prefixLength + #line) local remaining = w - (prefixLength + #line)