feat(buffer): add a method to build a Style out of an existing Cell

This commit is contained in:
Florian Dehau 2020-09-27 16:38:12 +02:00
parent 62495c3bd1
commit 41142732ec

View file

@ -51,6 +51,13 @@ impl Cell {
self
}
pub fn style(&self) -> Style {
Style::default()
.fg(self.fg)
.bg(self.bg)
.add_modifier(self.modifier)
}
pub fn reset(&mut self) {
self.symbol.clear();
self.symbol.push(' ');