aboutsummaryrefslogtreecommitdiffstats
path: root/vgaterminal.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'vgaterminal.cpp')
-rw-r--r--vgaterminal.cpp13
1 files changed, 11 insertions, 2 deletions
diff --git a/vgaterminal.cpp b/vgaterminal.cpp
index 8158b14..5f86081 100644
--- a/vgaterminal.cpp
+++ b/vgaterminal.cpp
@@ -8,7 +8,16 @@
void VGATerminal::write(char c) noexcept
{
+ checkpos();
+
switch (c) {
+ case '\b':
+ if (offset % Width) {
+ --offset;
+ put(' ');
+ --offset;
+ }
+ break;
case '\n':
offset += Width;
[[fallthrough]];
@@ -16,11 +25,11 @@ void VGATerminal::write(char c) noexcept
offset -= offset % Width;
break;
default:
- checkpos();
put(c);
- updatecursor();
break;
}
+
+ updatecursor();
}
void VGATerminal::put(char c) noexcept