Module edit

Source
Expand description

Keyboard/IME editing engine shared by TextInput and Editor. Text editing engine: caret, selection, IME, undo/redo, clipboard.

Shared by TextInput and Editor widgets. Operates on a TextBuffer via TextEditState and keymap translation (TextKeymap).

Structs§

TextEditOutcome
Side effects after applying an edit action.
TextEditState
Mutable edit session: caret, selection, IME preedit, scroll, undo stacks.
TextKeymap
Maps [KeyEvent] to TextEditAction for a given input mode and platform.
TextSelection
Caret and optional selection anchor (UTF-8 byte indices).

Enums§

PlatformKeymap
Platform-specific primary modifier (Ctrl vs Cmd).
TextEditAction
Editing command applied to a buffer through TextEditState.
TextInputMode
Single-line vs multi-line editing behavior.
TextMovement
Caret movement direction for keyboard navigation.

Functions§

clamp_boundary
Clamps a byte index backward to a valid UTF-8 boundary in text.