From 2cbe9c949254fa5abf8bae77c20ff93e7d6e8b51 Mon Sep 17 00:00:00 2001 From: starnakin Date: Sat, 7 Sep 2024 01:59:31 +0200 Subject: [PATCH] support \r --- src/terminal/terminal.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/terminal/terminal.c b/src/terminal/terminal.c index d782231..dcdc7e5 100644 --- a/src/terminal/terminal.c +++ b/src/terminal/terminal.c @@ -51,10 +51,11 @@ void terminal_putentryat(char c, uint8_t color, size_t x, size_t y) int terminal_putchar(char c) { - if (c == '\n') { + if (c == '\r') + terminal_row = 0; + else if (c == '\n') { terminal_column = 0; terminal_row++; - return 1; } if (!isprint(c)) return 1;