diff options
author | Joe Wilm <joe@jwilm.com> | 2016-11-19 21:47:51 -0800 |
---|---|---|
committer | Joe Wilm <joe@jwilm.com> | 2016-11-19 21:49:23 -0800 |
commit | 88a92982b11c62f3795ab49fdf33d72429bae051 (patch) | |
tree | 33efd1071b1312d13e214b997a48551ee7ccbbb5 | |
parent | 3db0bcb2a7672bff7f11da11fd18f735cab60d5b (diff) | |
download | alacritty-88a92982b11c62f3795ab49fdf33d72429bae051.tar.gz alacritty-88a92982b11c62f3795ab49fdf33d72429bae051.zip |
Fix mouse bindings
Config expected key and the default config file had the wrong section.
-rw-r--r-- | alacritty.yml | 2 | ||||
-rw-r--r-- | src/config.rs | 9 |
2 files changed, 7 insertions, 4 deletions
diff --git a/alacritty.yml b/alacritty.yml index 97914968..61134552 100644 --- a/alacritty.yml +++ b/alacritty.yml @@ -173,6 +173,6 @@ key_bindings: # - Paste # - PasteSelection # - Copy (TODO) -mouse: +mouse_bindings: - { mouse: Middle, action: PasteSelection } 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); } } |