diff options
author | Pascal Kuthe | 2022-10-01 00:15:25 +0000 |
---|---|---|
committer | Pascal Kuthe | 2022-10-01 17:29:46 +0000 |
commit | 71ee589bbc723e7a55585ddc2ca43c29ee93fabe (patch) | |
tree | f64805cc305349a2430cae837355e7ef6ee7546c /helix-tui/src/text.rs | |
parent | 79d3d44c3db48365597eefd274e868bc1e15de57 (diff) |
make underline_style a seperate option
Underline styles are mutally exclusive and overwrite each other.
Therefore implementing as an modifier lead to incorrect behaviour
when the underline style is overwritten.
For backwards compatability the "underline" modified is retained (but
deprecated). Instead the "underline_style" and "underline_color"
optios should be used to style underlines.
Diffstat (limited to 'helix-tui/src/text.rs')
-rw-r--r-- | helix-tui/src/text.rs | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/helix-tui/src/text.rs b/helix-tui/src/text.rs index 73d58803..1bfe5ee1 100644 --- a/helix-tui/src/text.rs +++ b/helix-tui/src/text.rs @@ -134,7 +134,8 @@ impl<'a> Span<'a> { /// style: Style { /// fg: Some(Color::Yellow), /// bg: Some(Color::Black), - /// underline: None, + /// underline_color: None, + /// underline_style: None, /// add_modifier: Modifier::empty(), /// sub_modifier: Modifier::empty(), /// }, @@ -144,7 +145,8 @@ impl<'a> Span<'a> { /// style: Style { /// fg: Some(Color::Yellow), /// bg: Some(Color::Black), - /// underline: None, + /// underline_color: None, + /// underline_style: None, /// add_modifier: Modifier::empty(), /// sub_modifier: Modifier::empty(), /// }, @@ -154,7 +156,8 @@ impl<'a> Span<'a> { /// style: Style { /// fg: Some(Color::Yellow), /// bg: Some(Color::Black), - /// underline: None, + /// underline_color: None, + /// underline_style: None, /// add_modifier: Modifier::empty(), /// sub_modifier: Modifier::empty(), /// }, @@ -164,7 +167,8 @@ impl<'a> Span<'a> { /// style: Style { /// fg: Some(Color::Yellow), /// bg: Some(Color::Black), - /// underline: None, + /// underline_color: None, + /// underline_style: None, /// add_modifier: Modifier::empty(), /// sub_modifier: Modifier::empty(), /// }, |