1
0
Fork 0
mirror of https://github.com/alacritty/alacritty.git synced 2024-11-11 13:51:01 -05:00

Fix characters swallowed during search

This resolves a bug where characters get swallowed when pressing them
after pressing backspace before the backspace key is released.
This commit is contained in:
Christian Duerr 2020-08-09 23:29:58 +00:00 committed by GitHub
parent 4b516c6365
commit 1d00883f10
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 2 deletions

View file

@ -28,6 +28,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
- Incorrect window location with negative `window.position` config options - Incorrect window location with negative `window.position` config options
- Slow rendering performance with HiDPI displays, especially on macOS - Slow rendering performance with HiDPI displays, especially on macOS
- Keys swallowed during search when pressing them right before releasing backspace
## 0.5.0 ## 0.5.0

View file

@ -863,7 +863,7 @@ impl<'a, T: EventListener, A: ActionContext<T>> Processor<'a, T, A> {
*self.ctx.received_count() = 0; *self.ctx.received_count() = 0;
self.process_key_bindings(input); self.process_key_bindings(input);
}, },
ElementState::Released => *self.ctx.suppress_chars() = false, ElementState::Released => (),
} }
} }
@ -892,6 +892,8 @@ impl<'a, T: EventListener, A: ActionContext<T>> Processor<'a, T, A> {
} }
} }
*self.ctx.suppress_chars() = false;
return; return;
} }
@ -951,7 +953,7 @@ impl<'a, T: EventListener, A: ActionContext<T>> Processor<'a, T, A> {
let binding = binding.clone(); let binding = binding.clone();
binding.execute(&mut self.ctx); binding.execute(&mut self.ctx);
// Don't suppress when there has been a `ReceiveChar` action. // Pass through the key if any of the bindings has the `ReceiveChar` action.
*suppress_chars.get_or_insert(true) &= binding.action != Action::ReceiveChar; *suppress_chars.get_or_insert(true) &= binding.action != Action::ReceiveChar;
} }
} }