clutter: Use character offsets for specifying the surrounding text
clutter_input_focus_set_surrounding() expects cursor and anchor positions
to be provided in character offsets.
Closes: https://gitlab.gnome.org/GNOME/mutter/-/issues/3440
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3719>
(cherry picked from commit 4b1411696e
)
This commit is contained in:
parent
7f344053f8
commit
a0dd01c95f
1 changed files with 2 additions and 2 deletions
|
@ -336,8 +336,8 @@ clutter_text_input_focus_request_surrounding (ClutterInputFocus *focus)
|
|||
anchor_pos = cursor_pos;
|
||||
|
||||
clutter_input_focus_set_surrounding (focus, text,
|
||||
g_utf8_offset_to_pointer (text, cursor_pos) - text,
|
||||
g_utf8_offset_to_pointer (text, anchor_pos) - text);
|
||||
cursor_pos,
|
||||
anchor_pos);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
Loading…
Reference in a new issue