eraseLineToCursor method

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

Erases the line from the start of the line to the cursor, including the cursor.

Implementation

void eraseLineToCursor({bool respectProtected = false}) {
  currentLine.isWrapped = false;
  currentLine.eraseRange(
    0,
    _cursorX + 1,
    terminal.cursor,
    respectProtected: respectProtected,
  );
}