Skip to content

Commit

Permalink
Fix trigger of normal bindings in mouse mode
Browse files Browse the repository at this point in the history
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: 500b696 (Prefer exact matches for bindings in mouse mode)
Fixes alacritty#7415.
  • Loading branch information
kchibisov committed Dec 8, 2023
1 parent e34762b commit 1a143d1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion alacritty/src/input/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 1a143d1

Please sign in to comment.