[gnome-shell/wip/carlosg/im-untimely-preedit-41: 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-41: 1/3] inputMethod: Equate empty preedit string to null
- Date: Mon, 1 Nov 2021 17:39:08 +0000 (UTC)
commit b1538fcb2079b836ac5f8170a0949f77bb5f35e4
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.
(Cherry-picked from commit 286cfdc6d48dc4315df54d29d7d16b5198d92a56)
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]