1
0
Fork 0
mirror of https://github.com/alacritty/alacritty.git synced 2024-11-25 14:05:41 -05:00

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 2023-12-08 09:09:01 +04:00 committed by GitHub
parent e34762beae
commit 1a143d11d3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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;
}