aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKirill Chibisov <contact@kchibisov.com>2023-07-20 08:21:47 +0000
committerGitHub <noreply@github.com>2023-07-20 08:21:47 +0000
commit044d9226016a70ed825a2d1e928b580de3f967b7 (patch)
tree8dc3a10634cd3553ecf7bf848449553a7c74f811
parent52a004cce445eae63dd5b2385a352d60a130a382 (diff)
downloadalacritty-044d9226016a70ed825a2d1e928b580de3f967b7.tar.gz
alacritty-044d9226016a70ed825a2d1e928b580de3f967b7.zip
Use bracketed paste only for multi-char IME input
Some IME setups do only `commit` single char input, like fcitx5 when doing ru input.
-rw-r--r--alacritty/src/event.rs3
1 files changed, 2 insertions, 1 deletions
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<EventProxy, ActionContext<'_, Notifier, EventProxy>> {
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) => {