eraseDisplayFromCursor method

void eraseDisplayFromCursor({
  1. bool respectProtected = false,
})

Erases the viewport from the cursor position to the end of the buffer, including the cursor position.

Implementation

void eraseDisplayFromCursor({bool respectProtected = false}) {
  eraseLineFromCursor(respectProtected: respectProtected);

  for (var i = absoluteCursorY + 1; i < height; i++) {
    final line = lines[i];
    line.isWrapped = false;
    line.eraseRange(
      0,
      viewWidth,
      terminal.cursor,
      respectProtected: respectProtected,
    );
  }
}