nextGraphemeBoundary abstract method

CellOffset? nextGraphemeBoundary(
  1. CellOffset from,
  2. int dCol,
  3. int dRow
)

Returns the screen-space cell position of the grapheme boundary nearest from, moved one grapheme in the given direction:

  • dCol > 0 → the boundary one grapheme to the right.
  • dCol < 0 → one grapheme to the left.
  • dRow > 0 → one row down at roughly the same column.
  • dRow < 0 → one row up at roughly the same column.

Returns null when from isn't inside this Selectable's content OR when the move would land outside it (the caller should try the next Selectable in reading order). The cursor system uses this to advance Shift+Arrow by full graphemes — so wide characters and ZWJ sequences are crossed in one keystroke instead of leaving the cursor stranded on a continuation cell.

Implementation

CellOffset? nextGraphemeBoundary(CellOffset from, int dCol, int dRow);