1
0
Fork 0

Handle terminal resize by not handling it :D

This commit is contained in:
Casey 2023-10-20 02:49:09 +03:00
parent 7d7b03474d
commit 062d16ea69
Signed by: hkc
GPG Key ID: F0F6CFE11CDB0960
1 changed files with 3 additions and 4 deletions

View File

@ -290,10 +290,11 @@ term.setBackgroundColor(mplayer.colors.bg)
term.setTextColor(mplayer.colors.fg)
term.clear()
local tw, th = term.getSize()
parallel.waitForAny(
function()
while true do
local tw, th = term.getSize()
-- Current screen
term.setCursorPos(1, 2)
mplayer.screens[mplayer.currentScreen].render(mplayer)
@ -356,9 +357,9 @@ function()
end,
function()
local pretty = require("cc.pretty")
local tw, th = term.getSize()
while true do
local _evd = { os.pullEvent() }
local tw, th = term.getSize()
local ev, evd = table.remove(_evd, 1), _evd
if ev == "key" then
mplayer.heldKeys[evd[1]] = evd[2]
@ -407,8 +408,6 @@ function()
end
cx = cx + #caption
end
elseif ev == "term_resize" then
tw, th = term.getSize()
elseif ev == "tape_removed" then
mplayer.songs = {}
elseif ev == "tape_inserted" then