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.

(Cherry-picked from commit 286cfdc6d4)
This commit is contained in:
Carlos Garnacho 2021-10-29 16:41:55 +02:00
parent 025588b89a
commit b1538fcb20

View File

@ -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);