From 88a92982b11c62f3795ab49fdf33d72429bae051 Mon Sep 17 00:00:00 2001 From: Joe Wilm Date: Sat, 19 Nov 2016 21:47:51 -0800 Subject: Fix mouse bindings Config expected key and the default config file had the wrong section. --- src/config.rs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/config.rs b/src/config.rs index 704c4237..8ab6e662 100644 --- a/src/config.rs +++ b/src/config.rs @@ -378,9 +378,6 @@ impl de::Deserialize for RawBinding { } } visitor.end()?; - if key.is_none() { - return Err(V::Error::missing_field("key")); - } let action = match (action, chars) { (Some(_), Some(_)) => { @@ -1010,6 +1007,12 @@ mod tests { let config: Config = ::serde_yaml::from_str(ALACRITTY_YML) .expect("deserialize config"); + // Sanity check that mouse bindings are being parsed + assert!(config.mouse_bindings.len() >= 1); + + // Sanity check that key bindings are being parsed + assert!(config.key_bindings.len() >= 1); + println!("config: {:#?}", config); } } -- cgit