fix(ansikit): flush on io.write

lua5.4
TorchedSammy 2022-04-02 12:14:29 -04:00
parent 24d0b8ead7
commit 0826839846
Signed by: sammyette
GPG Key ID: 904FC49417B44DCD
1 changed files with 5 additions and 1 deletions

View File

@ -89,21 +89,25 @@ end
ansikit.print = function(text) ansikit.print = function(text)
io.write(ansikit.format(text)) io.write(ansikit.format(text))
io.flush()
return ansikit return ansikit
end end
ansikit.printCode = function(code, terminate) ansikit.printCode = function(code, terminate)
io.write(ansikit.getCode(code, terminate)) io.write(ansikit.getCode(code, terminate))
io.flush()
return ansikit return ansikit
end end
ansikit.printCSI = function(code, endc) ansikit.printCSI = function(code, endc)
io.write(ansikit.getCSI(code, endc)) io.write(ansikit.getCSI(code, endc))
io.flush()
return ansikit return ansikit
end end
ansikit.println = function(text) ansikit.println = function(text)
print(ansikit.print(text)) io.write(ansikit.format(text) .. "\n")
io.flush()
return ansikit return ansikit
end end