From decacd40a6171bb1bb8245e748c29f71ba942bb5 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Sun, 22 Dec 2002 22:13:31 +0000 Subject: [PATCH] Don't add attributes with empty ranges. (fixes #101564 and #80637) 2002-12-22 Matthias Clasen * gtk/gtktextlayout.c (add_preedit_attrs): Don't add attributes with empty ranges. (fixes #101564 and #80637) --- ChangeLog | 5 +++++ ChangeLog.pre-2-10 | 5 +++++ ChangeLog.pre-2-2 | 5 +++++ ChangeLog.pre-2-4 | 5 +++++ ChangeLog.pre-2-6 | 5 +++++ ChangeLog.pre-2-8 | 5 +++++ gtk/gtktextlayout.c | 3 +++ 7 files changed, 33 insertions(+) diff --git a/ChangeLog b/ChangeLog index 4d81341c85..83bea4dce4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2002-12-22 Matthias Clasen + + * gtk/gtktextlayout.c (add_preedit_attrs): Don't add attributes + with empty ranges. (fixes #101564 and #80637) + 2002-12-21 Tor Lillqvist * gdk/win32/gdkwindow-win32.c (gdk_window_new): Move the code that diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 4d81341c85..83bea4dce4 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,8 @@ +2002-12-22 Matthias Clasen + + * gtk/gtktextlayout.c (add_preedit_attrs): Don't add attributes + with empty ranges. (fixes #101564 and #80637) + 2002-12-21 Tor Lillqvist * gdk/win32/gdkwindow-win32.c (gdk_window_new): Move the code that diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index 4d81341c85..83bea4dce4 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -1,3 +1,8 @@ +2002-12-22 Matthias Clasen + + * gtk/gtktextlayout.c (add_preedit_attrs): Don't add attributes + with empty ranges. (fixes #101564 and #80637) + 2002-12-21 Tor Lillqvist * gdk/win32/gdkwindow-win32.c (gdk_window_new): Move the code that diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index 4d81341c85..83bea4dce4 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,8 @@ +2002-12-22 Matthias Clasen + + * gtk/gtktextlayout.c (add_preedit_attrs): Don't add attributes + with empty ranges. (fixes #101564 and #80637) + 2002-12-21 Tor Lillqvist * gdk/win32/gdkwindow-win32.c (gdk_window_new): Move the code that diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index 4d81341c85..83bea4dce4 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,8 @@ +2002-12-22 Matthias Clasen + + * gtk/gtktextlayout.c (add_preedit_attrs): Don't add attributes + with empty ranges. (fixes #101564 and #80637) + 2002-12-21 Tor Lillqvist * gdk/win32/gdkwindow-win32.c (gdk_window_new): Move the code that diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 4d81341c85..83bea4dce4 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,8 @@ +2002-12-22 Matthias Clasen + + * gtk/gtktextlayout.c (add_preedit_attrs): Don't add attributes + with empty ranges. (fixes #101564 and #80637) + 2002-12-21 Tor Lillqvist * gdk/win32/gdkwindow-win32.c (gdk_window_new): Move the code that diff --git a/gtk/gtktextlayout.c b/gtk/gtktextlayout.c index 70125e5227..9f31aee78e 100644 --- a/gtk/gtktextlayout.c +++ b/gtk/gtktextlayout.c @@ -1587,6 +1587,9 @@ add_preedit_attrs (GtkTextLayout *layout, if (end == G_MAXINT) end = layout->preedit_len; + if (end == start) + continue; + pango_attr_iterator_get_font (iter, font_desc, &language, &extra_attrs); tmp_list = extra_attrs;