aboutsummaryrefslogtreecommitdiff
path: root/alacritty_terminal
diff options
context:
space:
mode:
authorChristian Duerr <contact@christianduerr.com>2023-06-15 10:59:12 +0200
committerGitHub <noreply@github.com>2023-06-15 08:59:12 +0000
commitafffdbe612cb8b573016184400e0deeb0137ccb9 (patch)
tree3f79b638ec3e5c8f85f2ba784898ee1fa9034322 /alacritty_terminal
parentbe03effdbe5b5bdabfed50d87963e78017329182 (diff)
downloadalacritty-afffdbe612cb8b573016184400e0deeb0137ccb9.tar.gz
alacritty-afffdbe612cb8b573016184400e0deeb0137ccb9.zip
Fix `alacritty msg config` toml replacement
This fixes a regression introduced in bd49067 which broke the override of configuration file variables using `alacritty msg config`. To fix this the `replace` functionality was rewritten to behave more like the `serde_utils::merge` where entire values are inserted into the existing structure rather than separating the keys from the values. Fixes: bd49067 (Switch to TOML configuration format)
Diffstat (limited to 'alacritty_terminal')
-rw-r--r--alacritty_terminal/src/ansi.rs7
1 files changed, 2 insertions, 5 deletions
diff --git a/alacritty_terminal/src/ansi.rs b/alacritty_terminal/src/ansi.rs
index 5a28bda5..694520bd 100644
--- a/alacritty_terminal/src/ansi.rs
+++ b/alacritty_terminal/src/ansi.rs
@@ -52,12 +52,9 @@ impl<'de> serde::Deserialize<'de> for CursorShapeShim {
}
impl alacritty_config::SerdeReplace for CursorShapeShim {
- fn replace(&mut self, key: &str, value: toml::Value) -> Result<(), Box<dyn std::error::Error>> {
- if !key.is_empty() {
- return Err(format!("Fields \"{0}\" do not exist", key).into());
- }
-
+ fn replace(&mut self, value: toml::Value) -> Result<(), Box<dyn std::error::Error>> {
*self = serde::Deserialize::deserialize(value)?;
+
Ok(())
}
}