summaryrefslogtreecommitdiff
path: root/helix-view/src
diff options
context:
space:
mode:
authorPascal Kuthe2022-10-11 10:11:33 +0000
committerPascal Kuthe2022-10-11 10:11:33 +0000
commit328c4d002f5eaef2b79c73a48ce5011e89425b54 (patch)
tree9b1278cd5e97e8c260d78318f99cedc7b9679892 /helix-view/src
parent2f7088c1f37f11606944a9db52814a652f97fdcd (diff)
adress review comments
Diffstat (limited to 'helix-view/src')
-rw-r--r--helix-view/src/graphics.rs18
-rw-r--r--helix-view/src/theme.rs3
2 files changed, 10 insertions, 11 deletions
diff --git a/helix-view/src/graphics.rs b/helix-view/src/graphics.rs
index 01344748..4374a537 100644
--- a/helix-view/src/graphics.rs
+++ b/helix-view/src/graphics.rs
@@ -365,16 +365,16 @@ bitflags! {
///
/// let m = Modifier::BOLD | Modifier::ITALIC;
/// ```
- #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize), serde(rename_all = "kebab-case"))]
+ #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
pub struct Modifier: u16 {
- const BOLD = 0b0000_0000_0000_0001;
- const DIM = 0b0000_0000_0000_0010;
- const ITALIC = 0b0000_0000_0000_0100;
- const SLOW_BLINK = 0b0000_0000_0001_0000;
- const RAPID_BLINK = 0b0000_0000_0010_0000;
- const REVERSED = 0b0000_0000_0100_0000;
- const HIDDEN = 0b0000_0000_1000_0000;
- const CROSSED_OUT = 0b0000_0001_0000_0000;
+ const BOLD = 0b0000_0000_0001;
+ const DIM = 0b0000_0000_0010;
+ const ITALIC = 0b0000_0000_0100;
+ const SLOW_BLINK = 0b0000_0001_0000;
+ const RAPID_BLINK = 0b0000_0010_0000;
+ const REVERSED = 0b0000_0100_0000;
+ const HIDDEN = 0b0000_1000_0000;
+ const CROSSED_OUT = 0b0001_0000_0000;
}
}
diff --git a/helix-view/src/theme.rs b/helix-view/src/theme.rs
index b1c96f94..c32b3edf 100644
--- a/helix-view/src/theme.rs
+++ b/helix-view/src/theme.rs
@@ -268,7 +268,7 @@ impl ThemePalette {
value
.as_str()
.and_then(|s| s.parse().ok())
- .ok_or(format!("Theme: invalid underline_style: {}", value))
+ .ok_or(format!("Theme: invalid underline-style: {}", value))
}
pub fn parse_style(&self, style: &mut Style, value: Value) -> Result<(), String> {
@@ -279,7 +279,6 @@ impl ThemePalette {
"bg" => *style = style.bg(self.parse_color(value)?),
"underline-color" => *style = style.underline_color(self.parse_color(value)?),
"underline-style" => {
- warn!("found style");
*style = style.underline_style(Self::parse_underline_style(&value)?)
}
"modifiers" => {