1
0
Fork 0

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:
Shiki Okasaka 2024-04-23 23:33:56 +09:00 committed by Jonas Ådahl
parent 7f344053f8
commit a0dd01c95f

View file

@ -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