Commit 717b615a authored by Luis Javier Merino's avatar Luis Javier Merino
Browse files

Cursor PreviousLine should respect the top margin

From esctest:
CPLTests.test_CPL_StopsAtTopMarginInScrollRegion
parent d2437fbb
......@@ -155,7 +155,8 @@ void Screen::cursorPreviousLine(int n)
n = 1; // Default
}
_cuX = 0;
_cuY = qMax(0, _cuY - n);
const int stop = _cuY < _topMargin ? 0 : _topMargin;
_cuY = qMax(stop, _cuY - n);
}
void Screen::cursorRight(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