[gnome-shell/wip/carlosg/im-untimely-preedit: 1/3] inputMethod: Equate empty preedit string to null
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/wip/carlosg/im-untimely-preedit: 1/3] inputMethod: Equate empty preedit string to null
- Date: Fri, 29 Oct 2021 14:50:21 +0000 (UTC)
commit 4a7a0c52b3c939bbace78fd5886cf498dd31d2a9
Author: Carlos Garnacho <carlosg gnome org>
Date: Fri Oct 29 16:41:55 2021 +0200
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.
js/misc/inputMethod.js | 2 ++
1 file changed, 2 insertions(+)
---
diff --git a/js/misc/inputMethod.js b/js/misc/inputMethod.js
index 1f9eaee7a8..7de7540d3f 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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]