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

Use bracketed paste only for multi-char IME input

Some IME setups do only `commit` single char input, like fcitx5 when
doing ru input.
This commit is contained in:
Kirill Chibisov 2023-07-20 08:21:47 +00:00 committed by GitHub
parent 52a004cce4
commit 044d922601
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1342,7 +1342,8 @@ impl input::Processor<EventProxy, ActionContext<'_, Notifier, EventProxy>> {
WindowEvent::Ime(ime) => match ime { WindowEvent::Ime(ime) => match ime {
Ime::Commit(text) => { Ime::Commit(text) => {
*self.ctx.dirty = true; *self.ctx.dirty = true;
self.ctx.paste(&text, true); // Don't use bracketed paste for single char input.
self.ctx.paste(&text, text.chars().count() > 1);
self.ctx.update_cursor_blinking(); self.ctx.update_cursor_blinking();
}, },
Ime::Preedit(text, cursor_offset) => { Ime::Preedit(text, cursor_offset) => {