aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAqua-sama <aqua@iserlohn-fortress.net>2021-02-12 19:14:56 +0200
committerAqua-sama <aqua@iserlohn-fortress.net>2021-02-12 19:14:56 +0200
commit8190adce177a2622550eba65427eb5ce246c4e11 (patch)
tree2f0a18d5e114fb46721291c2722f6ffb08627d56
parentAdd serial0 console output (diff)
downloadkernel.cpp-8190adce177a2622550eba65427eb5ce246c4e11.tar.xz
CGA: blank last line when scrolling up
-rw-r--r--drivers/cga.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/cga.cc b/drivers/cga.cc
index 79facee..961d7e4 100644
--- a/drivers/cga.cc
+++ b/drivers/cga.cc
@@ -100,6 +100,11 @@ void CGA::write(char c) {
buffer[prev] = buffer[idx];
}
}
+
+ // blank out last row
+ for (size_t idx = (max_rows - 1) * max_columns; idx < max_rows * max_columns; ++idx) {
+ buffer[idx].c = ' ';
+ }
--row;
}
}