Skip to main content

Module buffer

Module buffer 

Source

Re-exports§

pub use encoding::Encoding;
pub use file_kind::BufferFileKind;
pub use format::BufferFormat;
pub use format::LineEnding;
pub use persistence::Persistence;
pub use save::SudoSaveRequired;
pub use search::ChunkedSearchState;
pub use search::HybridSearchPlan;
pub use crate::model::filesystem::SearchMatch;
pub use crate::primitives::line_iterator::LineIterator;

Modules§

file_kind
File-kind classification for a TextBuffer.
format
Encoding and line-ending state for a TextBuffer.
persistence
Persistence state for a TextBuffer.
save
Save/write-recipe logic for TextBuffer.
search

Structs§

BufferConfig
Configuration passed to TextBuffer constructors.
BufferSnapshot
Snapshot of a TextBuffer’s piece tree and associated string buffers.
ChunkInfo
Information about a chunk of data for pattern matching
LargeFileEncodingConfirmation
Error returned when a large file has a non-resynchronizable encoding and requires user confirmation before loading the entire file into memory.
LineData
Line data with optional line number
LineScanChunk
A work item for incremental line-feed scanning (one per leaf).
OverlappingChunks
Iterator that yields overlapping chunks for pattern matching
TextBuffer
A text buffer that manages document content using a piece table with integrated line tracking
TextBufferLineIterator
Iterator over lines in a TextBuffer that efficiently tracks line numbers using piece tree metadata (single source of truth)

Enums§

LineNumber
Line ending format used in the file Represents a line number (simplified for new implementation) Legacy enum kept for backwards compatibility - always Absolute now

Constants§

CHUNK_ALIGNMENT
Chunk alignment for lazy loading (64 KB)
DEFAULT_LARGE_FILE_THRESHOLD
Default threshold for considering a file “large” (100 MB)
LOAD_CHUNK_SIZE
Chunk size to load when lazy loading (1 MB)

Type Aliases§

Buffer
Type alias for backwards compatibility