eraseDisplayToCursor method

void eraseDisplayToCursor()

Erases the viewport from the top-left corner to the cursor, including the cursor.

Implementation

void eraseDisplayToCursor() {
  eraseLineToCursor();

  for (var i = 0; i < _cursorY; i++) {
    final line = lines[i + scrollBack];
    line.isWrapped = false;
    line.eraseRange(0, viewWidth, terminal.cursor);
  }
}