backspaceWord method

bool backspaceWord()

Deletes the word before the cursor, including trailing spaces.

Implementation

bool backspaceWord() {
  final end = _cursorPosition;
  moveCursorWordLeft();
  if (end == _cursorPosition) return false;
  _replace(textBeforeCursor + text.substring(end), _cursorPosition);
  return true;
}