Skip to main content

Module delta

Module delta 

Source
Expand description

Structured text change deltas.

editor-core historically exposed state changes as a coarse event (crate::StateChangeType::DocumentModified) plus a best-effort affected region. For a full-featured editor, incremental consumers (LSP sync, incremental parsing, indexing, match highlighting, etc.) typically need structured edits without diffing old/new text.

This module defines a small, UI-agnostic delta format expressed in character offsets (Unicode scalar values).

Structsยง

TextDelta
A structured description of a document text change.
TextDeltaEdit
A single text edit expressed in character offsets.