From 062d16ea69644a73aa965ea0928a765446ecc58f Mon Sep 17 00:00:00 2001 From: hkc Date: Fri, 20 Oct 2023 02:49:09 +0300 Subject: [PATCH] Handle terminal resize by not handling it :D --- mess/tmpc.lua | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/mess/tmpc.lua b/mess/tmpc.lua index 8aa5ec6..bde4d20 100644 --- a/mess/tmpc.lua +++ b/mess/tmpc.lua @@ -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