Skip to main content

Module edit

Module edit 

Expand description

Editing semantics for the math field: caret movement, word motion, selection, delete/backspace (with GeoGebra-style structure unwrapping), structured input building (/, ^, sqrt, pi→π, …) and clipboard.

The caret is a Path (a real position in the structured model), never a | character in the content. A selection is an anchor path + the caret; both must share the same row (selections don’t span structure boundaries, matching GeoGebra), so a selection is represented as a (steps, a..b) range over one row.

Structs§

Editor
The full editor state for one field.
Sel
A selection over a single row: the row’s steps and an inclusive-start / exclusive-end index range, plus which end is the moving caret.