1
1
mirror of https://git.shadowkat.net/izaya/OC-PsychOS2.git synced 2024-11-22 12:04:20 -05:00

made :read()ing from a terminal not leave the trailing \n

This commit is contained in:
XeonSquared 2019-11-09 13:16:51 +11:00
parent 6b5677b870
commit 150541d91b

View File

@ -31,8 +31,7 @@ function vtemu(gpua,scra) -- creates a process to handle the GPU and screen addr
coroutine.yield() coroutine.yield()
end end
local n = buf:find("\n") local n = buf:find("\n")
r, buf = buf:sub(1,n), buf:sub(n+1) r, buf = buf:sub(1,n-1), buf:sub(n+1)
dprint("bread",r)
return r return r
end end
return bread, write, function() io.write("\27[2J\27[H") end return bread, write, function() io.write("\27[2J\27[H") end