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:
parent
4b516c6365
commit
1d00883f10
2 changed files with 5 additions and 2 deletions
|
@ -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
|
||||
- Slow rendering performance with HiDPI displays, especially on macOS
|
||||
- Keys swallowed during search when pressing them right before releasing backspace
|
||||
|
||||
## 0.5.0
|
||||
|
||||
|
|
|
@ -863,7 +863,7 @@ impl<'a, T: EventListener, A: ActionContext<T>> 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<T>> Processor<'a, T, A> {
|
|||
}
|
||||
}
|
||||
|
||||
*self.ctx.suppress_chars() = false;
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -951,7 +953,7 @@ impl<'a, T: EventListener, A: ActionContext<T>> 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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue