From 9b9fcc87cf4fabc037470a078affcca61884b8bd Mon Sep 17 00:00:00 2001 From: pointer-to-bios Date: Sat, 9 Mar 2024 16:59:54 +0800 Subject: [PATCH] =?UTF-8?q?tty=E4=BF=AE=E5=A4=8D\t\r=E7=AD=89=E6=8E=A7?= =?UTF-8?q?=E5=88=B6=E5=AD=97=E7=AC=A6=E5=85=89=E6=A0=87=E5=9B=BE=E5=83=8F?= =?UTF-8?q?=E6=AE=8B=E7=95=99=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/kernel/tty/tty.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/kernel/tty/tty.c b/src/kernel/tty/tty.c index 3530a47..21e1418 100644 --- a/src/kernel/tty/tty.c +++ b/src/kernel/tty/tty.c @@ -175,17 +175,20 @@ void tty_text_print(tty *ttyx, char *string, u32 color, u32 bgcolor) } else if (c == '\t') { // 水平制表符 + putchar(ttyx, ' ', 0, 0); ttyx->text.column += 8; ttyx->text.column -= ttyx->text.column % 8; continue; } else if (c == '\r') { // 回到行首 + putchar(ttyx, ' ', 0, 0); ttyx->text.column = 0; continue; } else if (c == '\v') { // 垂直制表符 + putchar(ttyx, ' ', 0, 0); ttyx->text.line++; if (ttyx->text.line == ttyx->text.height) {