navigateToNextSlot method

bool navigateToNextSlot()

Navigate to the next Slot.

Uses Enter key to jump to the next input slot in compound structures (fractions, sub/superscripts, roots etc.). E.g. in \frac{|}{}, pressing Enter -> jumps to denominator \frac{}{|}.

Returns true if navigation was successful, false if not inside a compound structure.

Implementation

bool navigateToNextSlot() {
  final nextOffset = SlotNavigator.nextSlotOffset(_cursorOffset, _document);
  if (nextOffset == null) return false;

  moveCursorTo(nextOffset);
  return true;
}