From a3f729f5899a1d56222641f362805f251de3f84d Mon Sep 17 00:00:00 2001 From: Christian Duerr Date: Thu, 1 Nov 2018 20:50:32 +0000 Subject: Fix default hollow cursor behavior with empty conf The 2c37da48b580237ff48f5e841015134dd459b41d change introduced some changes to the way cursor configuration is handled. However it did not properly handle the default behavior of the hollow cursor when the `cursor` field was not specified at all. By implementing the `Default` trait for the `Cursor` struct in `config.rs` manually, the default value of the `unfocused_hollow` field has been corrected back to `true` when the `cursor` struct isn't present at all. --- src/config.rs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/config.rs b/src/config.rs index ae26f76e..5e30b65a 100644 --- a/src/config.rs +++ b/src/config.rs @@ -1206,7 +1206,7 @@ fn deserialize_color_index<'a, D>(deserializer: D) -> ::std::result::Result Self { + Self { + style: Default::default(), + unfocused_hollow: true, + } + } +} + #[derive(Debug, Copy, Clone, Default, Deserialize)] pub struct CursorColors { #[serde(default, deserialize_with = "deserialize_optional_color")] -- cgit