From 1d00883f10500675bbe2bb62916d6a16499972ee Mon Sep 17 00:00:00 2001 From: Christian Duerr Date: Sun, 9 Aug 2020 23:29:58 +0000 Subject: 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. --- alacritty/src/input.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'alacritty/src') diff --git a/alacritty/src/input.rs b/alacritty/src/input.rs index 44d81217..c5407090 100644 --- a/alacritty/src/input.rs +++ b/alacritty/src/input.rs @@ -863,7 +863,7 @@ impl<'a, T: EventListener, A: ActionContext> Processor<'a, T, A> { *self.ctx.received_count() = 0; self.process_key_bindings(input); }, - ElementState::Released => *self.ctx.suppress_chars() = false, + ElementState::Released => (), } } @@ -892,6 +892,8 @@ impl<'a, T: EventListener, A: ActionContext> Processor<'a, T, A> { } } + *self.ctx.suppress_chars() = false; + return; } @@ -951,7 +953,7 @@ impl<'a, T: EventListener, A: ActionContext> Processor<'a, T, A> { let binding = binding.clone(); 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; } } -- cgit