summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2021-04-21 17:43:12 +0000
committerMatthias Clasen <mclasen@redhat.com>2021-04-21 17:43:12 +0000
commitebd8338795e2b15516fdd93429f4c82b73fe8ca3 (patch)
tree41d8d1eaf9c0ecb5ba067a2d1a2c9a3e49a3233a
parent11d637f86913c51b8658e03d8e2dcd04a25ead7b (diff)
parent15483ac9df346b4ff59bb5286ba2598b729b88f1 (diff)
downloadgtk+-ebd8338795e2b15516fdd93429f4c82b73fe8ca3.tar.gz
Merge branch 'im-cursor-pos' into 'master'
imcontext: Fix cursor positions Closes #3885 See merge request GNOME/gtk!3464
-rw-r--r--gtk/gtkimcontextsimple.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gtk/gtkimcontextsimple.c b/gtk/gtkimcontextsimple.c
index a3a2c54c8f..074ffdd01f 100644
--- a/gtk/gtkimcontextsimple.c
+++ b/gtk/gtkimcontextsimple.c
@@ -1152,7 +1152,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)
{