From a28a1aa2a5a8e2feb5b285e2cd44bd1ac3d2151f Mon Sep 17 00:00:00 2001 From: payonel Date: Sat, 31 Mar 2018 17:38:12 -0700 Subject: [PATCH] should check timeout before blinking --- .../resources/assets/opencomputers/loot/openos/lib/term.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/resources/assets/opencomputers/loot/openos/lib/term.lua b/src/main/resources/assets/opencomputers/loot/openos/lib/term.lua index 55dad9c35..999127967 100644 --- a/src/main/resources/assets/opencomputers/loot/openos/lib/term.lua +++ b/src/main/resources/assets/opencomputers/loot/openos/lib/term.lua @@ -231,7 +231,7 @@ function term.pull(...) args.n = args.n - 1 end 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))) cursor:echo(not s[1]) if s.n > 1 then return table.unpack(s, 1, s.n) end