scrollUp method

ViewportModel scrollUp(
  1. int n
)

Scrolls up by the given number of lines.

Implementation

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