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
diff --git a/gtk/gtkimcontextsimple.c b/gtk/gtkimcontextsimple.c index 38806d0..2cb2289 100644 --- a/gtk/gtkimcontextsimple.c +++ b/gtk/gtkimcontextsimple.c
@@ -1128,7 +1128,7 @@ } if (cursor_pos) - *cursor_pos = s->len; + *cursor_pos = g_utf8_strlen (s->str, s->len); if (attrs) {