vcl/unx/gtk/gtksalframe.cxx | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-)
New commits: commit 4d6fc3c88902ca74f934960e7600df99605dea48 Author: Caolán McNamara <caol...@redhat.com> Date: Tue Apr 24 19:10:33 2018 +0100 Related: tdf#116951 use same pattern for gtk2 Change-Id: Ic6f1a018b4d0016af5a19052ef46ea87c7923acb Reviewed-on: https://gerrit.libreoffice.org/53416 Reviewed-by: Caolán McNamara <caol...@redhat.com> Tested-by: Caolán McNamara <caol...@redhat.com> diff --git a/vcl/unx/gtk/gtksalframe.cxx b/vcl/unx/gtk/gtksalframe.cxx index ad4b00d26927..3f99b8c30d3d 100644 --- a/vcl/unx/gtk/gtksalframe.cxx +++ b/vcl/unx/gtk/gtksalframe.cxx @@ -3559,8 +3559,14 @@ void GtkSalFrame::IMHandler::signalIMPreeditChanged( GtkIMContext*, gpointer im_ ExtTextInputAttr sal_attr = ExtTextInputAttr::NONE; pango_attr_iterator_range (iter, &start, &end); - if (end == G_MAXINT) - end = pText ? g_utf8_strlen(pText, -1) : 0; + if (start == G_MAXINT || end == G_MAXINT) + { + auto len = pText ? g_utf8_strlen(pText, -1) : 0; + if (end == G_MAXINT) + end = len; + if (start == G_MAXINT) + start = len; + } if (end == start) continue; _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits