nvim_gtk/ui_model/
cell.rs

1use std::rc::Rc;
2
3use crate::highlight::Highlight;
4
5#[derive(Clone)]
6pub struct Cell {
7    pub hl: Rc<Highlight>,
8    pub ch: String,
9    pub dirty: bool,
10    pub double_width: bool,
11}
12
13impl Cell {
14    pub fn new_empty() -> Cell {
15        Cell {
16            hl: Rc::new(Highlight::new()),
17            ch: String::new(),
18            dirty: true,
19            double_width: false,
20        }
21    }
22
23    pub fn clear(&mut self, hl: Rc<Highlight>) {
24        self.ch.clear();
25        self.hl = hl;
26        self.dirty = true;
27        self.double_width = false;
28    }
29}