Skip to main content

Module selection_edit

Module selection_edit 

Source
Expand description

Selection-aware edit planning for the synchronous engine.

Every command that mutates buffer text routes through here. The public SelectionEdit enum names the operation; plan turns it into a SelectionEditPlan of atomic EditOps in descending byte order (so sequential Buffer::apply calls keep their pre-edit offsets valid) plus the post-edit selection set; apply_plan runs the ops against a mutable buffer and returns the final revision.

Per-family planners (newlines, word-scope deletes, line ops, inline shape edits, markdown) live in sibling modules to keep this file under the 600-line cap.

Structs§

SelectionEditPlan
A planned selection edit against one immutable pre-edit buffer state.

Enums§

CaseKind
Case-conversion kinds.
EmphasisKind
Markdown emphasis flavor.
IndentUnit
Indent unit used by SelectionEdit::Indent / SelectionEdit::Outdent.
LineEnding
Line-ending convention.
SelectionEdit
A selection-aware edit requested by an editor command.
SortKind
Sort variant used by SelectionEdit::SortLines.

Functions§

apply_plan
Apply already-planned ops and assign the final selection set.
plan
Build atomic edit ops for a selection-aware edit.