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

pull/389/head
Florian Dehau 4 years ago
parent 62495c3bd1
commit 41142732ec

@ -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(' ');

Loading…
Cancel
Save