fixed stupid stupid bug that made term.write fail horribly when writing multiline strings in non-wrapping mode

This commit is contained in:
Florian Nücke 2014-02-26 17:03:29 +01:00
parent 6f8bb90f24
commit 794590399d

View File

@ -338,7 +338,7 @@ function term.write(value, wrap)
end end
local blink = term.getCursorBlink() local blink = term.getCursorBlink()
term.setCursorBlink(false) term.setCursorBlink(false)
local line, nl = value local line, nl
repeat repeat
local wrapAfter, margin = math.huge, math.huge local wrapAfter, margin = math.huge, math.huge
if wrap then if wrap then
@ -356,7 +356,7 @@ function term.write(value, wrap)
component.gpu.fill(1, h, w, 1, " ") component.gpu.fill(1, h, w, 1, " ")
cursorY = h cursorY = h
end end
until not wrap or not value until not value
term.setCursorBlink(blink) term.setCursorBlink(blink)
end end