diff --git a/CHANGELOG.md b/CHANGELOG.md index e34d9e0f..a729bf25 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ### Fixed +- CLI env variables clearing configuration file variables - Vi inline search/semantic selection expanding across newlines ## 0.13.1 diff --git a/alacritty_config/src/lib.rs b/alacritty_config/src/lib.rs index 81e43bb8..8da91e19 100644 --- a/alacritty_config/src/lib.rs +++ b/alacritty_config/src/lib.rs @@ -61,7 +61,15 @@ impl<'de, T: SerdeReplace + Deserialize<'de>> SerdeReplace for Option { impl<'de, T: Deserialize<'de>> SerdeReplace for HashMap { fn replace(&mut self, value: Value) -> Result<(), Box> { - replace_simple(self, value) + // Deserialize replacement as HashMap. + let hashmap: HashMap = Self::deserialize(value)?; + + // Merge the two HashMaps, replacing existing values. + for (key, value) in hashmap { + self.insert(key, value); + } + + Ok(()) } }