aboutsummaryrefslogtreecommitdiff
path: root/helix-tui/src
diff options
context:
space:
mode:
authorPascal Kuthe2022-10-12 09:33:48 +0000
committerPascal Kuthe2022-10-12 09:33:48 +0000
commit963a0ac0bbc43e2b26a9662bc67dd226582ad12a (patch)
tree27a260178996997673011619d02ce54cba40d4f0 /helix-tui/src
parent328c4d002f5eaef2b79c73a48ce5011e89425b54 (diff)
fix terminfo detection
Diffstat (limited to 'helix-tui/src')
-rw-r--r--helix-tui/src/backend/crossterm.rs14
1 files changed, 7 insertions, 7 deletions
diff --git a/helix-tui/src/backend/crossterm.rs b/helix-tui/src/backend/crossterm.rs
index 7b3b0817..7c7250fa 100644
--- a/helix-tui/src/backend/crossterm.rs
+++ b/helix-tui/src/backend/crossterm.rs
@@ -113,21 +113,21 @@ where
}
let mut new_underline_style = cell.underline_style;
- if !self.capabilities.has_extended_underlines {
- match new_underline_style {
- UnderlineStyle::Reset | UnderlineStyle::Line => (),
- _ => new_underline_style = UnderlineStyle::Line,
- }
-
+ if self.capabilities.has_extended_underlines {
if cell.underline_color != underline_color {
let color = CColor::from(cell.underline_color);
map_error(queue!(self.buffer, SetUnderlineColor(color)))?;
underline_color = cell.underline_color;
}
+ } else {
+ match new_underline_style {
+ UnderlineStyle::Reset | UnderlineStyle::Line => (),
+ _ => new_underline_style = UnderlineStyle::Line,
+ }
}
if new_underline_style != underline_style {
- let attr = CAttribute::from(cell.underline_style);
+ let attr = CAttribute::from(new_underline_style);
map_error(queue!(self.buffer, SetAttribute(attr)))?;
underline_style = new_underline_style;
}