From 0790605adfba6231db82c74070a2530ab862fbfa Mon Sep 17 00:00:00 2001 From: Christian Duerr Date: Thu, 31 Dec 2020 05:06:15 +0000 Subject: [PATCH] Fix characters getting swallowed during IME input This reverts 1d00883 since it is not necessary anymore after all search bindings are now proper key bindings. This fixes a bug which would cause the first character to be swallowed when using IME after triggering any key binding which doesn't send any `ReceivedCharacter` event. Fixes #4588. --- CHANGELOG.md | 1 + alacritty/src/input.rs | 4 +--- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c05d2a31..f367308f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -47,6 +47,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - Missing glyph symbols not being rendered for missing glyphs on macOS and Windows - Underline cursor being obscured by underline - Cursor not being rendered with a lot of unicode glyphs visible +- IME input swallowed after triggering a key binding ### Removed diff --git a/alacritty/src/input.rs b/alacritty/src/input.rs index 55799dc5..259ceeba 100644 --- a/alacritty/src/input.rs +++ b/alacritty/src/input.rs @@ -824,7 +824,7 @@ impl<'a, T: EventListener, A: ActionContext> Processor<'a, T, A> { *self.ctx.received_count() = 0; self.process_key_bindings(input); }, - ElementState::Released => (), + ElementState::Released => *self.ctx.suppress_chars() = false, } } @@ -854,8 +854,6 @@ impl<'a, T: EventListener, A: ActionContext> Processor<'a, T, A> { self.ctx.search_input(c); } - *self.ctx.suppress_chars() = false; - return; }