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: 500b696ca8 (Prefer exact matches for bindings in mouse mode)
Fixes #7415.
This commit is contained in:
Kirill Chibisov authored and GitHub committed 2023-12-08 09:09:01 +04:00
1 parent e34762beae
commit 1a143d11d3
1 file changed
+2 -1
+2 -1
View File
@@ -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;
}