tty修复\t\r等控制字符光标图像残留的问题
This commit is contained in:
parent
5dc9de8195
commit
9b9fcc87cf
|
@ -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)
|
||||
{
|
||||
|
|
Reference in New Issue