//! Text model for Lutra (layer L0). //! //! Holds the rope buffer, line and column positions, UTF-8/UTF-16 offset //! conversion and edit application. Every other crate converts text offsets //! through this crate instead of slicing strings by hand. //! //! - [`Buffer`]: a [`ropey`] rope plus the file's [`LineEnding`]. //! - [`Position`] and [`ColumnUnit`]: zero-based line and column, the //! column in UTF-16 code units (LSP, CodeMirror) or in chars. //! - [`Edit`] and [`Buffer::apply`]: atomic batches of byte-range edits. //! - [`TextError`]: every conversion and edit is fallible instead of //! panicking on bad offsets. mod buffer; mod edit; mod error; pub mod line_ending; mod position; pub use buffer::Buffer; pub use edit::Edit; pub use error::TextError; pub use line_ending::LineEnding; pub use position::{ColumnUnit, Position};