Expand description
Buffer: a thin, edit-aware wrapper around ropey::Rope.
All edits flow through apply_edit, which:
- validates the range against current bounds
- mutates the rope in O(log n)
- returns enough information for the caller to record an inverse for undo
and an
AppliedEditfor change events
This crate does not own the actor that serializes edits; that lives in the dispatcher (later phase). Callers are expected to hold the buffer behind whatever single-writer discipline they prefer.
Structs§
- Applied
Edit - What an
apply_editproduced. The caller uses this to log change events and to construct an inverseEditfor the undo stack. - Buffer
- A rope-backed text buffer: the raw text storage under every
Document.
Functions§
- transform_
position - Transform a position across an edit (§4.1 of owner-write-caret.md).