[gnome-shell/wip/fmuellner/im-set-surrounding] inputMethod: Fix setting surrounding text
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/wip/fmuellner/im-set-surrounding] inputMethod: Fix setting surrounding text
- Date: Wed, 12 Sep 2018 11:56:14 +0000 (UTC)
commit 443db2d29f9ec284fc41682231bca60f06b39fb4
Author: Florian Müllner <fmuellner gnome org>
Date: Tue Sep 11 15:36:35 2018 +0200
inputMethod: Fix setting surrounding text
The underlying ibus method expects an object of type IBusText rather
than a plain string.
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/228
js/misc/inputMethod.js | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/js/misc/inputMethod.js b/js/misc/inputMethod.js
index 320a6cc33..241057092 100644
--- a/js/misc/inputMethod.js
+++ b/js/misc/inputMethod.js
@@ -176,8 +176,11 @@ var InputMethod = new Lang.Class({
},
vfunc_set_surrounding(text, cursor, anchor) {
- if (this._context)
- this._context.set_surrounding_text(text, cursor, anchor);
+ if (!this._context)
+ return;
+
+ let ibusText = IBus.Text.new_from_string(text);
+ this._context.set_surrounding_text(ibusText, cursor, anchor);
},
vfunc_update_content_hints(hints) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]