diff options
author | Kirill Chibisov <contact@kchibisov.com> | 2023-12-08 09:09:01 +0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-08 09:09:01 +0400 |
commit | 1a143d11d3296816bef1ea5b1a0b7bf54b92f4a5 (patch) | |
tree | 25d09a9c8b76e43314a0660737f9c289bbfe7ce6 | |
parent | e34762beae5d5b6b261a2a61433761f9dbd45d37 (diff) | |
download | alacritty-1a143d11d3296816bef1ea5b1a0b7bf54b92f4a5.tar.gz alacritty-1a143d11d3296816bef1ea5b1a0b7bf54b92f4a5.zip |
Fix trigger of normal bindings in mouse mode
We should ensure that the `Shift` is actually pressed when trying to
prefer regular bindings instead of the ones if we had Shift applied.
Fixes: 500b696ca8ed (Prefer exact matches for bindings in mouse mode)
Fixes #7415.
-rw-r--r-- | alacritty/src/input/mod.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/alacritty/src/input/mod.rs b/alacritty/src/input/mod.rs index e811e4c4..a465fd37 100644 --- a/alacritty/src/input/mod.rs +++ b/alacritty/src/input/mod.rs @@ -1000,7 +1000,8 @@ impl<T: EventListener, A: ActionContext<T>> Processor<T, A> { let mut check_fallback = mouse_mode && mods.contains(ModifiersState::SHIFT); for binding in &mouse_bindings { - if binding.is_triggered_by(mode, mods, &button) { + // Don't trigger normal bindings in mouse mode unless Shift is pressed. + if binding.is_triggered_by(mode, mods, &button) && (check_fallback || !mouse_mode) { binding.action.execute(&mut self.ctx); check_fallback = false; } |