aboutsummaryrefslogtreecommitdiff
path: root/helix-view/src/gutter.rs
diff options
context:
space:
mode:
authorPascal Kuthe2022-10-01 00:15:25 +0000
committerPascal Kuthe2022-10-01 17:29:46 +0000
commit71ee589bbc723e7a55585ddc2ca43c29ee93fabe (patch)
treef64805cc305349a2430cae837355e7ef6ee7546c /helix-view/src/gutter.rs
parent79d3d44c3db48365597eefd274e868bc1e15de57 (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-view/src/gutter.rs')
-rw-r--r--helix-view/src/gutter.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/helix-view/src/gutter.rs b/helix-view/src/gutter.rs
index ab0e2986..2c207d27 100644
--- a/helix-view/src/gutter.rs
+++ b/helix-view/src/gutter.rs
@@ -1,7 +1,7 @@
use std::fmt::Write;
use crate::{
- graphics::{Color, Modifier, Style},
+ graphics::{Color, Style, UnderlineStyle},
Document, Editor, Theme, View,
};
@@ -147,7 +147,7 @@ pub fn breakpoints<'doc>(
.find(|breakpoint| breakpoint.line == line)?;
let mut style = if breakpoint.condition.is_some() && breakpoint.log_message.is_some() {
- error.add_modifier(Modifier::UNDERLINED)
+ error.underline_style(UnderlineStyle::Line)
} else if breakpoint.condition.is_some() {
error
} else if breakpoint.log_message.is_some() {