From 1a143d11d3296816bef1ea5b1a0b7bf54b92f4a5 Mon Sep 17 00:00:00 2001 From: Kirill Chibisov Date: Fri, 8 Dec 2023 09:09:01 +0400 Subject: 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. --- alacritty/src/input/mod.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'alacritty/src') 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> Processor { 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; } -- cgit