aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/config.rs13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/config.rs b/src/config.rs
index 7f5a5823..b8768c01 100644
--- a/src/config.rs
+++ b/src/config.rs
@@ -706,11 +706,19 @@ pub enum Error {
#[derive(Debug, Deserialize)]
pub struct Colors {
primary: PrimaryColors,
+ #[serde(default="default_cursor_colors")]
cursor: PrimaryColors,
normal: AnsiColors,
bright: AnsiColors,
}
+fn default_cursor_colors() -> PrimaryColors {
+ PrimaryColors {
+ foreground: Rgb { r: 0, g: 0, b: 0 },
+ background: Rgb { r: 0xff, g: 0xff, b: 0xff },
+ }
+}
+
#[derive(Debug, Deserialize)]
pub struct PrimaryColors {
#[serde(deserialize_with = "rgb_from_hex")]
@@ -726,10 +734,7 @@ impl Default for Colors {
background: Rgb { r: 0, g: 0, b: 0 },
foreground: Rgb { r: 0xea, g: 0xea, b: 0xea },
},
- cursor: PrimaryColors {
- foreground: Rgb { r: 0, g: 0, b: 0 },
- background: Rgb { r: 0xff, g: 0xff, b: 0xff },
- },
+ cursor: default_cursor_colors(),
normal: AnsiColors {
black: Rgb {r: 0x00, g: 0x00, b: 0x00},
red: Rgb {r: 0xd5, g: 0x4e, b: 0x53},