Cursor NextLine should respect the bottom margin

From esctest:
CNLTests.test_CNL_StopsAtBottomMarginInScrollRegion
wilder
Luis Javier Merino Morán 5 years ago
parent 566912883d
commit d2437fbb2b
  1. 3
      src/Screen.cpp

@ -144,7 +144,8 @@ void Screen::cursorNextLine(int n)
n = MAX_SCREEN_ARGUMENT; n = MAX_SCREEN_ARGUMENT;
} }
_cuX = 0; _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) void Screen::cursorPreviousLine(int n)

Loading…
Cancel
Save