diff options
author | Peng Wu <alexepico@gmail.com> | 2017-10-31 13:07:02 +0800 |
---|---|---|
committer | Michael Catanzaro <mcatanzaro@igalia.com> | 2017-11-15 10:27:56 -0600 |
commit | e8316c1c6f46b844b265478622d3a581305b70b6 (patch) | |
tree | 8a1ec31e4b653cbc3f446a7287f5e3933e173991 /pango | |
parent | 377b6e7e853a05715e1a53f0739042eb23418da7 (diff) | |
download | pango-e8316c1c6f46b844b265478622d3a581305b70b6.tar.gz |
Fix is_char_break issue in pango_default_break function
For most cases, the is_char_break variable should be TRUE.
https://bugzilla.gnome.org/show_bug.cgi?id=789625
Diffstat (limited to 'pango')
-rw-r--r-- | pango/break.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/pango/break.c b/pango/break.c index c46f3382..2e66972e 100644 --- a/pango/break.c +++ b/pango/break.c @@ -1159,11 +1159,10 @@ pango_default_break (const gchar *text, } attrs[i].is_line_break = TRUE; /* Rule LB31 */ - /* Unicode doesn't specify char wrap; we wrap around all chars - * except where a line break is prohibited, which means we - * effectively break everywhere except inside runs of spaces. - */ - attrs[i].is_char_break = TRUE; + /* Unicode doesn't specify char wrap; + we wrap around all chars currently. */ + if (attrs[i].is_cursor_position) + attrs[i].is_char_break = TRUE; /* Make any necessary replacements first */ if (row_break_type == G_UNICODE_BREAK_UNKNOWN) @@ -1458,7 +1457,6 @@ pango_default_break (const gchar *text, { case BREAK_PROHIBITED: /* can't break here */ - attrs[i].is_char_break = FALSE; attrs[i].is_line_break = FALSE; break; |