From 286cfdc6d48dc4315df54d29d7d16b5198d92a56 Mon Sep 17 00:00:00 2001 From: Carlos Garnacho Date: Fri, 29 Oct 2021 16:41:55 +0200 Subject: [PATCH] inputMethod: Equate empty preedit string to null If we get '' from the IM as the preedit string, it is pretty safe to handle it as "no preedit" altogether. Part-of: --- js/misc/inputMethod.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/js/misc/inputMethod.js b/js/misc/inputMethod.js index 1f9eaee7a..7de7540d3 100644 --- a/js/misc/inputMethod.js +++ b/js/misc/inputMethod.js @@ -111,6 +111,8 @@ class InputMethod extends Clutter.InputMethod { return; let preedit = text.get_text(); + if (preedit === '') + preedit = null; if (visible) this.set_preedit_text(preedit, pos, mode);