imwayland: Fix get_preedit_string cursor position
GtkIMContext get_preedit_string should return cursor position counted in characters, but cursor_begin here is counted in bytes. This add the missing conversion.
This commit is contained in:
@@ -582,7 +582,8 @@ gtk_im_context_wayland_get_preedit_string (GtkIMContext *context,
|
||||
if (str)
|
||||
*str = g_strdup (preedit_str);
|
||||
if (cursor_pos)
|
||||
*cursor_pos = context_wayland->current_preedit.cursor_begin;
|
||||
*cursor_pos = g_utf8_strlen (preedit_str,
|
||||
context_wayland->current_preedit.cursor_begin);
|
||||
|
||||
if (attrs)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user