aboutsummaryrefslogblamecommitdiff
path: root/helix-core/src/state.rs
blob: dcc4b11b7fe40fadbf22b8a44f3bedb73f608f8b (plain) (tree)
1
2
3
4
5
6
7
8
9
                             
 
                       
                  
                             

            
               
                                   
              
                
                                           
         
 
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),
        }
    }
}