You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
helix-plus/helix-core/src/state.rs

40 lines
759 B
Rust

use crate::{Buffer, Selection};
/// A state represents the current editor state of a single buffer.
pub struct State {
// TODO: maybe doc: ?
buffer: Buffer,
selection: Selection,
}
impl State {
#[must_use]
pub fn new(buffer: Buffer) -> Self {
Self {
buffer,
selection: Selection::single(0, 0),
}
}
// TODO: buf/selection accessors
// update/transact
// replaceSelection (transaction that replaces selection)
// changeByRange
// changes
// slice
//
// getters:
// tabSize
// indentUnit
// languageDataAt()
//
// config:
// indentation
// tabSize
// lineUnit
// syntax
// foldable
// changeFilter/transactionFilter
}