Fix mouse bindings
Config expected key and the default config file had the wrong section.
This commit is contained in:
parent
3db0bcb2a7
commit
88a92982b1
|
@ -173,6 +173,6 @@ key_bindings:
|
||||||
# - Paste
|
# - Paste
|
||||||
# - PasteSelection
|
# - PasteSelection
|
||||||
# - Copy (TODO)
|
# - Copy (TODO)
|
||||||
mouse:
|
mouse_bindings:
|
||||||
- { mouse: Middle, action: PasteSelection }
|
- { mouse: Middle, action: PasteSelection }
|
||||||
|
|
||||||
|
|
|
@ -378,9 +378,6 @@ impl de::Deserialize for RawBinding {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
visitor.end()?;
|
visitor.end()?;
|
||||||
if key.is_none() {
|
|
||||||
return Err(V::Error::missing_field("key"));
|
|
||||||
}
|
|
||||||
|
|
||||||
let action = match (action, chars) {
|
let action = match (action, chars) {
|
||||||
(Some(_), Some(_)) => {
|
(Some(_), Some(_)) => {
|
||||||
|
@ -1010,6 +1007,12 @@ mod tests {
|
||||||
let config: Config = ::serde_yaml::from_str(ALACRITTY_YML)
|
let config: Config = ::serde_yaml::from_str(ALACRITTY_YML)
|
||||||
.expect("deserialize config");
|
.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);
|
println!("config: {:#?}", config);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue