mirror of
https://github.com/MightyPirates/OpenComputers.git
synced 2025-09-19 12:17:17 -04:00
should check timeout before blinking
This commit is contained in:
parent
a80f6363d5
commit
a28a1aa2a5
@ -231,7 +231,7 @@ function term.pull(...)
|
|||||||
args.n = args.n - 1
|
args.n = args.n - 1
|
||||||
end
|
end
|
||||||
local cursor = core_cursor.new(nil, tty.window, tty.stream) -- cursors can blink (base arg is optional)
|
local cursor = core_cursor.new(nil, tty.window, tty.stream) -- cursors can blink (base arg is optional)
|
||||||
while cursor:echo() and timeout >= computer.uptime() do
|
while timeout >= computer.uptime() and cursor:echo() do
|
||||||
local s = table.pack(event.pull(.5, table.unpack(args, 1, args.n)))
|
local s = table.pack(event.pull(.5, table.unpack(args, 1, args.n)))
|
||||||
cursor:echo(not s[1])
|
cursor:echo(not s[1])
|
||||||
if s.n > 1 then return table.unpack(s, 1, s.n) end
|
if s.n > 1 then return table.unpack(s, 1, s.n) end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user