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')
|
else if (c == '\t')
|
||||||
{ // 水平制表符
|
{ // 水平制表符
|
||||||
|
putchar(ttyx, ' ', 0, 0);
|
||||||
ttyx->text.column += 8;
|
ttyx->text.column += 8;
|
||||||
ttyx->text.column -= ttyx->text.column % 8;
|
ttyx->text.column -= ttyx->text.column % 8;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
else if (c == '\r')
|
else if (c == '\r')
|
||||||
{ // 回到行首
|
{ // 回到行首
|
||||||
|
putchar(ttyx, ' ', 0, 0);
|
||||||
ttyx->text.column = 0;
|
ttyx->text.column = 0;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
else if (c == '\v')
|
else if (c == '\v')
|
||||||
{ // 垂直制表符
|
{ // 垂直制表符
|
||||||
|
putchar(ttyx, ' ', 0, 0);
|
||||||
ttyx->text.line++;
|
ttyx->text.line++;
|
||||||
if (ttyx->text.line == ttyx->text.height)
|
if (ttyx->text.line == ttyx->text.height)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue