From 044d9226016a70ed825a2d1e928b580de3f967b7 Mon Sep 17 00:00:00 2001 From: Kirill Chibisov Date: Thu, 20 Jul 2023 08:21:47 +0000 Subject: [PATCH] Use bracketed paste only for multi-char IME input Some IME setups do only `commit` single char input, like fcitx5 when doing ru input. --- alacritty/src/event.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/alacritty/src/event.rs b/alacritty/src/event.rs index 52222080..426b207e 100644 --- a/alacritty/src/event.rs +++ b/alacritty/src/event.rs @@ -1342,7 +1342,8 @@ impl input::Processor> { WindowEvent::Ime(ime) => match ime { Ime::Commit(text) => { *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(); }, Ime::Preedit(text, cursor_offset) => {