|
|
@ -8,8 +8,8 @@ use crossterm::{
|
|
|
|
},
|
|
|
|
},
|
|
|
|
execute, queue,
|
|
|
|
execute, queue,
|
|
|
|
style::{
|
|
|
|
style::{
|
|
|
|
Attribute as CAttribute, Color as CColor, Print, SetAttribute, SetBackgroundColor,
|
|
|
|
Attribute as CAttribute, Color as CColor, Colors, Print, SetAttribute, SetBackgroundColor,
|
|
|
|
SetForegroundColor,
|
|
|
|
SetColors, SetForegroundColor,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
terminal::{self, Clear, ClearType},
|
|
|
|
terminal::{self, Clear, ClearType},
|
|
|
|
Command,
|
|
|
|
Command,
|
|
|
@ -260,14 +260,12 @@ where
|
|
|
|
diff.queue(&mut self.buffer)?;
|
|
|
|
diff.queue(&mut self.buffer)?;
|
|
|
|
modifier = cell.modifier;
|
|
|
|
modifier = cell.modifier;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if cell.fg != fg {
|
|
|
|
if cell.fg != fg || cell.bg != bg {
|
|
|
|
let color = CColor::from(cell.fg);
|
|
|
|
queue!(
|
|
|
|
queue!(self.buffer, SetForegroundColor(color))?;
|
|
|
|
self.buffer,
|
|
|
|
|
|
|
|
SetColors(Colors::new(cell.fg.into(), cell.bg.into()))
|
|
|
|
|
|
|
|
)?;
|
|
|
|
fg = cell.fg;
|
|
|
|
fg = cell.fg;
|
|
|
|
}
|
|
|
|
|
|
|
|
if cell.bg != bg {
|
|
|
|
|
|
|
|
let color = CColor::from(cell.bg);
|
|
|
|
|
|
|
|
queue!(self.buffer, SetBackgroundColor(color))?;
|
|
|
|
|
|
|
|
bg = cell.bg;
|
|
|
|
bg = cell.bg;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|