From dd8e718e1997fba05d79e8bce48c7267ab274176 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Thu, 20 Jan 2022 22:06:32 -0500 Subject: Fix allow_breaks handling handling of segmentation attributes can introduce line breaks, after we removed them in allow_breaks handling. Change the order to handle allow_breaks last, so this doesn't happen. Update affected tests. --- pango/break.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'pango/break.c') diff --git a/pango/break.c b/pango/break.c index 9027d6d6..05ec97c9 100644 --- a/pango/break.c +++ b/pango/break.c @@ -2110,9 +2110,6 @@ break_attrs (const char *text, pango_attr_list_insert (&hyphens, pango_attribute_copy (attr)); } - tailored |= handle_allow_breaks (text, length, &allow_breaks, offset, - log_attrs, log_attrs_len); - tailored |= handle_words (text, length, &words, offset, log_attrs, log_attrs_len); @@ -2122,6 +2119,9 @@ break_attrs (const char *text, tailored |= handle_hyphens (text, length, &hyphens, offset, log_attrs, log_attrs_len); + tailored |= handle_allow_breaks (text, length, &allow_breaks, offset, + log_attrs, log_attrs_len); + _pango_attr_list_destroy (&allow_breaks); _pango_attr_list_destroy (&words); _pango_attr_list_destroy (&sentences); -- cgit v1.2.1