diff options
author | Kirill Chibisov <contact@kchibisov.com> | 2023-12-06 01:36:28 +0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-06 01:36:28 +0400 |
commit | 7c9d9f3b166f2aade76d35408b5acb5d3ccd1c94 (patch) | |
tree | d2d83f5b3d33f508b15020a7bffa7a47334e9eb3 | |
parent | f94f4fd4bec024a7a189006b77aa8306b3ba3f88 (diff) | |
download | alacritty-7c9d9f3b166f2aade76d35408b5acb5d3ccd1c94.tar.gz alacritty-7c9d9f3b166f2aade76d35408b5acb5d3ccd1c94.zip |
Fix chars usage inside the mouse bindings
Fixes #7413.
-rw-r--r-- | CHANGELOG.md | 1 | ||||
-rw-r--r-- | alacritty/src/config/bindings.rs | 6 |
2 files changed, 5 insertions, 2 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index 58d0a70e..238769ca 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -74,6 +74,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - Vi cursor position not redrawn on PageUp/PageDown without scrollback - Cursor not updating when blinking and viewport is scrolled - Failure to start with recent version of mesa's i915 driver +- Error when using `chars` inside the mouse bindings ### Removed diff --git a/alacritty/src/config/bindings.rs b/alacritty/src/config/bindings.rs index a84e967a..d836c5e6 100644 --- a/alacritty/src/config/bindings.rs +++ b/alacritty/src/config/bindings.rs @@ -899,7 +899,7 @@ impl<'a> Deserialize<'a> for MouseButtonWrapper { type Value = MouseButtonWrapper; fn expecting(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - f.write_str("Left, Right, Middle, or a number from 0 to 65536") + f.write_str("Left, Right, Middle, Back, Forward, or a number from 0 to 65536") } fn visit_u64<E>(self, value: u64) -> Result<MouseButtonWrapper, E> @@ -920,6 +920,8 @@ impl<'a> Deserialize<'a> for MouseButtonWrapper { "Left" => Ok(MouseButtonWrapper(MouseButton::Left)), "Right" => Ok(MouseButtonWrapper(MouseButton::Right)), "Middle" => Ok(MouseButtonWrapper(MouseButton::Middle)), + "Back" => Ok(MouseButtonWrapper(MouseButton::Back)), + "Forward" => Ok(MouseButtonWrapper(MouseButton::Forward)), _ => Err(E::invalid_value(Unexpected::Str(value), &self)), } } @@ -1134,7 +1136,7 @@ impl<'a> Deserialize<'a> for RawBinding { chars = Some(map.next_value()?); }, Field::Mouse => { - if chars.is_some() { + if mouse.is_some() { return Err(<V::Error as Error>::duplicate_field("mouse")); } |