imcontext: Fix cursor positions
gtk_im_context_get_preedit_string is documented to return the cursor position as a character offset, not a byte count. So return that. Fixed: #3885
This commit is contained in:
parent
5e673e94de
commit
d6c45d0e17
@ -1131,7 +1131,7 @@ gtk_im_context_simple_get_preedit_string (GtkIMContext *context,
|
||||
}
|
||||
|
||||
if (cursor_pos)
|
||||
*cursor_pos = s->len;
|
||||
*cursor_pos = g_utf8_strlen (s->str, s->len);
|
||||
|
||||
if (attrs)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user