From 166744a828b9d02b6cc5a53c5d1e08dc502a42e5 Mon Sep 17 00:00:00 2001 From: tema5002 Date: Sun, 21 Jun 2026 17:12:35 +0000 Subject: [PATCH] I am a moron --- halyde/kernel/modules/terminal.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/halyde/kernel/modules/terminal.lua b/halyde/kernel/modules/terminal.lua index 28c6918..81e986d 100644 --- a/halyde/kernel/modules/terminal.lua +++ b/halyde/kernel/modules/terminal.lua @@ -505,10 +505,10 @@ function module.init() if byte >= 0x20 and byte <= 0x7F then table.insert(writeBuf, string.char(byte)) cursor.x = cursor.x + 1 - check_wrap_and_scroll() - if cursor.y ~= writeBufY or #writeBuf >= 32 then + if cursor.x > width then _PUBLIC.terminal.flush() end + check_wrap_and_scroll() elseif byte >= 0xC2 and byte <= 0xDF then current_codepoint = (byte & 0x1F) bytes_remaining = 1 @@ -524,10 +524,10 @@ function module.init() if bytes_remaining == 0 then table.insert(writeBuf, utf8.char(current_codepoint)) cursor.x = cursor.x + 1 - check_wrap_and_scroll() - if cursor.y ~= writeBufY or #writeBuf >= 32 then + if cursor.x > width then _PUBLIC.terminal.flush() end + check_wrap_and_scroll() current_codepoint = 0 end else