diff options
author | Matthias Clasen <mclasen@redhat.com> | 2022-03-18 23:25:14 -0400 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2022-03-18 23:28:17 -0400 |
commit | b36001e880dc13ba4d782a4f2a4a58467284229d (patch) | |
tree | 459e238c79709b9b616148810120eb6af1d18ae1 /pango | |
parent | 3b15fb81fe0078cb70fe5ff128d53e1cb146d3c7 (diff) | |
download | pango-b36001e880dc13ba4d782a4f2a4a58467284229d.tar.gz |
Maintain order in pango_attr_list_change
When PangoAttrList was changed to use an array,
we lost the code that maintained non-decreasing
order in pango_attr_list_change. Bring it back,
and add a test for this.
Diffstat (limited to 'pango')
-rw-r--r-- | pango/pango-attributes.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/pango/pango-attributes.c b/pango/pango-attributes.c index 60d14706..4d7111fa 100644 --- a/pango/pango-attributes.c +++ b/pango/pango-attributes.c @@ -2184,6 +2184,9 @@ pango_attr_list_change (PangoAttrList *list, if (tmp_attr2->start_index >= tmp_attr->start_index) break; + + g_ptr_array_index (list->attributes, k - 1) = tmp_attr2; + g_ptr_array_index (list->attributes, k) = tmp_attr; } } } |