diff options
author | Behdad Esfahbod <behdad@behdad.org> | 2015-04-06 12:17:16 -0700 |
---|---|---|
committer | Behdad Esfahbod <behdad@behdad.org> | 2015-04-06 12:18:28 -0700 |
commit | e2b89006dd2aae60805712a24534586ccdcc8d06 (patch) | |
tree | ab2e28cb56198d1e373504aeeef7dd5a8cc3638f /pango/break.c | |
parent | 2001c93eb59165ed1ed4801b05983c3d77333f45 (diff) | |
download | pango-e2b89006dd2aae60805712a24534586ccdcc8d06.tar.gz |
Fix tailoring of run boundary break properties
I have no idea how this was never caught before.
Diffstat (limited to 'pango/break.c')
-rw-r--r-- | pango/break.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/pango/break.c b/pango/break.c index 64b6d370..5d28e413 100644 --- a/pango/break.c +++ b/pango/break.c @@ -1798,7 +1798,8 @@ tailor_segment (const char *range_start, PangoLogAttr *log_attrs) { int chars_in_range; - PangoLogAttr attr_before = log_attrs[0]; + PangoLogAttr *start = log_attrs + chars_broken; + PangoLogAttr attr_before = *start; chars_in_range = pango_utf8_strlen (range_start, range_end - range_start); @@ -1806,18 +1807,18 @@ tailor_segment (const char *range_start, if (tailor_break (range_start, range_end - range_start, analysis, - log_attrs + chars_broken, + start, chars_in_range + 1)) { /* if tailored, we enforce some of the attrs from before tailoring at * the boundary */ - log_attrs[0].backspace_deletes_character = attr_before.backspace_deletes_character; + start->backspace_deletes_character = attr_before.backspace_deletes_character; - log_attrs[0].is_line_break |= attr_before.is_line_break; - log_attrs[0].is_mandatory_break |= attr_before.is_mandatory_break; - log_attrs[0].is_cursor_position |= attr_before.is_cursor_position; + start->is_line_break |= attr_before.is_line_break; + start->is_mandatory_break |= attr_before.is_mandatory_break; + start->is_cursor_position |= attr_before.is_cursor_position; } return chars_in_range; |