diff options
author | Timm Bäder <mail@baedert.org> | 2020-01-17 09:24:48 +0000 |
---|---|---|
committer | Timm Bäder <mail@baedert.org> | 2020-01-17 09:24:48 +0000 |
commit | da2e184639167d806d87e70e24a1152f247cbd7a (patch) | |
tree | e4ae5a218ef752571e3e3d4a75f6c1a43a2fd84c | |
parent | 7738a05bd26005c5a40a63a9a7ca7934de3d82f9 (diff) | |
parent | 9576222b475129d3b178a1fac9b511976c9695b7 (diff) | |
download | gtk+-da2e184639167d806d87e70e24a1152f247cbd7a.tar.gz |
Merge branch 'fix-imwayland-cursor' into 'master'
imwayland: Fix get_preedit_string cursor position (GTK4)
Closes #2383
See merge request GNOME/gtk!1328
-rw-r--r-- | gtk/gtkimcontextwayland.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gtk/gtkimcontextwayland.c b/gtk/gtkimcontextwayland.c index 3344a68cad..4fcc2f9a01 100644 --- a/gtk/gtkimcontextwayland.c +++ b/gtk/gtkimcontextwayland.c @@ -592,7 +592,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) { |