helix-mirror/helix-core/src/state.rs

18 lines
285 B
Rust
Raw Normal View History

use crate::{Rope, Selection};
#[derive(Debug, Clone)]
pub struct State {
pub doc: Rope,
pub selection: Selection,
}
impl State {
2020-05-28 09:45:44 +04:00
#[must_use]
pub fn new(doc: Rope) -> Self {
Self {
2020-06-01 12:42:28 +04:00
doc,
selection: Selection::point(0),
}
}
}