From 3211f473a62ac1acd6695410bbe6d1ab8b05d37c Mon Sep 17 00:00:00 2001 From: neru Date: Tue, 6 May 2025 20:12:43 -0300 Subject: [PATCH] fix: wrong check again --- lua/CC Tweaked/tutel/tutel-host.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lua/CC Tweaked/tutel/tutel-host.lua b/lua/CC Tweaked/tutel/tutel-host.lua index bb36c5d..ebfe6e2 100644 --- a/lua/CC Tweaked/tutel/tutel-host.lua +++ b/lua/CC Tweaked/tutel/tutel-host.lua @@ -238,8 +238,9 @@ function updateScreen() -- logs local function drawLogs(startY, endY) + local drawnLines = 0 for i = #log.buffer, 1, -1 do - if i > endY - startY then break end + if drawnLines > endY - startY then break end local entry = log.buffer[i] local format = logTypes[entry.type] @@ -262,6 +263,8 @@ function updateScreen() term.setTextColour(prevColourFg) term.write((" %s\n"):format(entry.message)) end + + drawnLines = drawnLines + 1 end end