cursorCharRight static method

TransactionSpec? cursorCharRight(
  1. EditorState state
)

Move the cursor one character to the right. Returns null if the cursor is already at the end of the document.

Implementation

static TransactionSpec? cursorCharRight(EditorState state) {
  final head = state.selection.main.head;
  if (head >= state.doc.length) return null;
  return TransactionSpec(selection: EditorSelection.cursor(head + 1));
}