Module buffer

Source
Expand description

Rope buffer with paragraph indexing and targeted invalidation. Rope-backed text buffer with per-paragraph revision tracking.

  • ropey enables O(log n) edits and fast paragraph splitting.
  • Each paragraph (separated by \n) has its own revision; edits bump only paragraphs intersecting the changed byte range.
  • Layout caches can invalidate per paragraph instead of flushing entirely.

Structsยง

ParagraphMeta
Metadata for one paragraph: UTF-8 byte range and revision counter.
TextBuffer
Mutable text storage with a paragraph index (logical line = \n-separated).