Skip to main content

Module buffer

Module buffer 

Source
Expand description

Ropey-backed text buffer module.

This module is split across multiple files to keep each concern small:

  • pos.rs: logical positions and selections
  • edit.rs: edit representation (char-indexed)
  • text_buffer.rs: the TextBuffer implementation (backed by ropey::Rope)
  • util.rs: internal helper functions
  • tests.rs: unit tests
  • prelude.rs: convenience re-exports for downstream crates

Re-exports§

pub use text_buffer::TextBuffer;

Modules§

prelude
Convenience re-exports for the buffer module.
text_buffer
Split implementation of the Ropey-backed TextBuffer.

Structs§

Edit
A text edit expressed in character indices within the buffer.
Pos
A stable identifier for positions within a buffer.
Selection
A selection expressed as an anchor + active cursor.