mirror of
https://github.com/edu4rdshl/gnome-shell.git
synced 2026-07-17 23:24:51 +00:00
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
This commit is contained in:
parent
361955dbf9
commit
a35382d6fc
1 changed files with 5 additions and 2 deletions
|
|
@ -176,8 +176,11 @@ var InputMethod = new Lang.Class({
|
|||
},
|
||||
|
||||
vfunc_set_surrounding(text, cursor, anchor) {
|
||||
if (this._context && text)
|
||||
this._context.set_surrounding_text(text, cursor, anchor);
|
||||
if (!this._context || !text)
|
||||
return;
|
||||
|
||||
let ibusText = IBus.Text.new_from_string(text);
|
||||
this._context.set_surrounding_text(ibusText, cursor, anchor);
|
||||
},
|
||||
|
||||
vfunc_update_content_hints(hints) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue