Back to API Reference
Class

SelectionChangeReason

static

Standard UserEvent values (CodeMirror 6 convention). Dotted-prefix so subscribers can match a whole family with reason.StartsWith("select."). New categories are just new strings; this is the canonical set the engine emits.

public static const string Pointer
public static const string Move
public static const string Extend
public static const string Word
public static const string Line
public static const string Paragraph
public static const string All
public static const string Programmatic
public static const string Input

Selection moved as a side-effect of a text mutation (insert / delete / IME commit).

public static const string Clamp

Selection clamped after the text shrank underneath it.

public static const string Normalize

Selection remapped to an equivalent canonical position after a projection or view change.

public static const string Style

Selection placed on the result of a style edit (wrap / strip / split).

public static const string Restore

Selection restored by undo / redo replay.

public static const string Defocus

Selection collapsed or cleared on focus loss.