I am a moron

This commit is contained in:
2026-07-19 11:44:02 +03:00
committed by WahPlus
parent 499dfd6843
commit 996d81129d
+4 -4
View File
@@ -530,10 +530,10 @@ function module.init()
if byte >= 0x20 and byte <= 0x7F then if byte >= 0x20 and byte <= 0x7F then
table.insert(writeBuf, string.char(byte)) table.insert(writeBuf, string.char(byte))
cursor.x = cursor.x + 1 cursor.x = cursor.x + 1
check_wrap_and_scroll() if cursor.x > width then
if cursor.y ~= writeBufY or #writeBuf >= 32 then
_PUBLIC.terminal.flush() _PUBLIC.terminal.flush()
end end
check_wrap_and_scroll()
elseif byte >= 0xC2 and byte <= 0xDF then elseif byte >= 0xC2 and byte <= 0xDF then
current_codepoint = (byte & 0x1F) current_codepoint = (byte & 0x1F)
bytes_remaining = 1 bytes_remaining = 1
@@ -549,10 +549,10 @@ function module.init()
if bytes_remaining == 0 then if bytes_remaining == 0 then
table.insert(writeBuf, utf8.char(current_codepoint)) table.insert(writeBuf, utf8.char(current_codepoint))
cursor.x = cursor.x + 1 cursor.x = cursor.x + 1
check_wrap_and_scroll() if cursor.x > width then
if cursor.y ~= writeBufY or #writeBuf >= 32 then
_PUBLIC.terminal.flush() _PUBLIC.terminal.flush()
end end
check_wrap_and_scroll()
current_codepoint = 0 current_codepoint = 0
end end
else else