scrollDown method

ViewportModel scrollDown(
  1. int n
)

Scrolls down by the given number of lines.

Implementation

ViewportModel scrollDown(int n) {
  if (atBottom || n == 0 || _lines.isEmpty) return this;
  final newModel = setYOffset(yOffset + n);
  return newModel.copyWith(
    currentHighlightIndex: newModel._findNearestMatch(),
  );
}