aboutsummaryrefslogtreecommitdiff
path: root/helix-core/src/state.rs
blob: dcc4b11b7fe40fadbf22b8a44f3bedb73f608f8b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use crate::{Rope, Selection};

#[derive(Debug, Clone)]
pub struct State {
    pub doc: Rope,
    pub selection: Selection,
}

impl State {
    #[must_use]
    pub fn new(doc: Rope) -> Self {
        Self {
            doc,
            selection: Selection::point(0),
        }
    }
}