Commit 1cb3de91 authored by Luis Javier Merino's avatar Luis Javier Merino
Browse files

SD (ScrollDown) should be able to clear the screen

Before, it couldn't scroll out of existence the last line.

From esctest:
SDTests.test_SD_CanClearScreen
parent caf5fceb
Pipeline #100600 passed with stage
in 1 minute and 56 seconds
......@@ -1076,10 +1076,11 @@ void Screen::scrollDown(int from, int n)
if (from > _bottomMargin) {
return;
}
if (from + n > _bottomMargin) {
n = _bottomMargin - from;
if (n >= _bottomMargin + 1 - from) {
n = _bottomMargin + 1 - from;
} else {
moveImage(loc(0, from + n), loc(0, from), loc(_columns - 1, _bottomMargin - n));
}
moveImage(loc(0, from + n), loc(0, from), loc(_columns - 1, _bottomMargin - n));
clearImage(loc(0, from), loc(_columns - 1, from + n - 1), ' ');
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment