Commit d2437fbb authored by Luis Javier Merino's avatar Luis Javier Merino
Browse files

Cursor NextLine should respect the bottom margin

From esctest:
CNLTests.test_CNL_StopsAtBottomMarginInScrollRegion
parent 56691288
......@@ -144,7 +144,8 @@ void Screen::cursorNextLine(int n)
n = MAX_SCREEN_ARGUMENT;
}
_cuX = 0;
_cuY = qMin(_cuY + n, _lines - 1);
const int stop = _cuY > _bottomMargin ? _lines - 1 : _bottomMargin;
_cuY = qMin(stop, _cuY + n);
}
void Screen::cursorPreviousLine(int n)
......
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