aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2019-11-11 13:29:30 -0500
committerJesse Luehrs <doy@tozt.net>2019-11-11 13:29:30 -0500
commit7a08f9fd8f9c6420ea33a5686abba5a209385924 (patch)
tree12456927ba3fb1d86e815264aae71f92aac5d42d
parent28cb645786aa233b975975173cff5f66c9b629c8 (diff)
downloadvt100-rust-7a08f9fd8f9c6420ea33a5686abba5a209385924.tar.gz
vt100-rust-7a08f9fd8f9c6420ea33a5686abba5a209385924.zip
actually remove the last bgcolor special case
-rw-r--r--src/row.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/row.rs b/src/row.rs
index 51fab96..439bf4b 100644
--- a/src/row.rs
+++ b/src/row.rs
@@ -221,12 +221,12 @@ impl Row {
}
fn content_width(&self, start: u16, formatting: bool) -> u16 {
+ let default_attrs = crate::attrs::Attrs::default();
for (col, cell) in
self.cells.iter().skip(start as usize).enumerate().rev()
{
if cell.has_contents()
- || (formatting
- && cell.bgcolor() != crate::attrs::Color::Default)
+ || (formatting && cell.attrs() != &default_attrs)
{
let width: u16 = col.try_into().unwrap();
return width + 1;