Kernel: Fix \b handling

Don't clear the character, only move cursor backwards
This commit is contained in:
Bananymous 2025-04-23 06:33:11 +03:00
parent 28bf2d6374
commit 20e17a28cf
2 changed files with 9 additions and 1 deletions

View File

@ -302,6 +302,8 @@ namespace Kernel
ASSERT(m_output.bytes > 0);
m_output.bytes--;
putchar('\b');
putchar(' ');
putchar('\b');
}
// Caret notation
else if (last < 32 || last == 127)
@ -309,12 +311,18 @@ namespace Kernel
m_output.bytes--;
putchar('\b');
putchar('\b');
putchar(' ');
putchar(' ');
putchar('\b');
putchar('\b');
}
// Ascii
else
{
m_output.bytes--;
putchar('\b');
putchar(' ');
putchar('\b');
}
}
}

View File

@ -411,7 +411,7 @@ namespace Kernel
break;
case BS:
if (m_column > 0)
putchar_at(' ', --m_column, m_row);
m_column--;
break;
case HT:
m_column++;