@@ -113,21 +113,21 @@ where
113113 }
114114
115115 let mut new_underline_style = cell.underline_style;
116− if !self.capabilities.has_extended_underlines {
117− match new_underline_style {
118− UnderlineStyle::Reset | UnderlineStyle::Line => (),
119− _ => new_underline_style = UnderlineStyle::Line,
120− }
121−
116+ if self.capabilities.has_extended_underlines {
122117 if cell.underline_color != underline_color {
123118 let color = CColor::from(cell.underline_color);
124119 map_error(queue!(self.buffer, SetUnderlineColor(color)))?;
125120 underline_color = cell.underline_color;
126121 }
122+ } else {
123+ match new_underline_style {
124+ UnderlineStyle::Reset | UnderlineStyle::Line => (),
125+ _ => new_underline_style = UnderlineStyle::Line,
126+ }
127127 }
128128
129129 if new_underline_style != underline_style {
130− let attr = CAttribute::from(cell.underline_style);
130+ let attr = CAttribute::from(new_underline_style);
131131 map_error(queue!(self.buffer, SetAttribute(attr)))?;
132132 underline_style = new_underline_style;
133133 }