moveCursor method
Moves by grapheme positions (negative = left, positive = right). The public cursor offset remains measured in UTF-16 code units.
Implementation
void moveCursor(int delta) {
final boundaries = _boundaries;
final index = boundaries.indexOf(_cursorPosition);
_cursorPosition =
boundaries[(index + delta).clamp(0, boundaries.length - 1)];
}