summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmmanuele Bassi <ebassi@gmail.com>2020-03-16 17:08:53 +0000
committerEmmanuele Bassi <ebassi@gmail.com>2020-03-16 17:08:53 +0000
commit5bf51adcce3a41d1b075193b24d3edd526d50e99 (patch)
tree8331676c5af33efe7b0998a12e766418032f2223
parentc6cc02637ebe9bd55e545d6e909e24592453d669 (diff)
parent5343ec3345b69777388462fc8f0740bad3800a21 (diff)
downloadgtk+-5bf51adcce3a41d1b075193b24d3edd526d50e99.tar.gz
Merge branch 'respect-text-len-gtk4' into 'master'
imcontextwayland: Honour len argument in gtk_im_context_wayland_set_surrounding See merge request GNOME/gtk!1529
-rw-r--r--gtk/gtkimcontextwayland.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gtk/gtkimcontextwayland.c b/gtk/gtkimcontextwayland.c
index 393f9b91c6..2462f7201f 100644
--- a/gtk/gtkimcontextwayland.c
+++ b/gtk/gtkimcontextwayland.c
@@ -860,7 +860,7 @@ gtk_im_context_wayland_set_surrounding (GtkIMContext *context,
context_wayland = GTK_IM_CONTEXT_WAYLAND (context);
g_free (context_wayland->surrounding.text);
- context_wayland->surrounding.text = g_strdup (text);
+ context_wayland->surrounding.text = g_strndup (text, len);
context_wayland->surrounding.cursor_idx = cursor_index;
/* Anchor is not exposed via the set_surrounding interface, emulating. */
context_wayland->surrounding.anchor_idx = cursor_index;