diff options
author | Matthias Clasen <mclasen@redhat.com> | 2011-11-19 19:28:48 -0500 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2011-11-19 19:28:48 -0500 |
commit | c3d96ff2c0bca78c8caafc7a853186362900af19 (patch) | |
tree | 1a9b2d148064276a91af71de2ca9ec84c3c4fec7 /gtk/gtkpango.c | |
parent | bcc98cf14cc77d1a7d45a3bbcd0179250e9a7fc9 (diff) | |
download | gtk+-c3d96ff2c0bca78c8caafc7a853186362900af19.tar.gz |
Improve AtkText implementations
There was some regressions from the recent display line fix;
while fixing it improve the test coverage and make GtkEntry
and GtkTextView return identical results.
Diffstat (limited to 'gtk/gtkpango.c')
-rw-r--r-- | gtk/gtkpango.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/gtk/gtkpango.c b/gtk/gtkpango.c index 2181b7b40b..6f72eeffaa 100644 --- a/gtk/gtkpango.c +++ b/gtk/gtkpango.c @@ -1143,7 +1143,7 @@ _gtk_pango_get_text_after (PangoLayout *layout, if (end < n_attrs - 1) { end = _gtk_pango_move_words (layout, end, 1); - while (!attrs[end].is_word_end && end < n_attrs - 1) + while (!attrs[end].is_word_start && end < n_attrs - 1) end = _gtk_pango_move_chars (layout, end, 1); } break; @@ -1158,7 +1158,7 @@ _gtk_pango_get_text_after (PangoLayout *layout, case ATK_TEXT_BOUNDARY_SENTENCE_START: if (_gtk_pango_is_inside_sentence (layout, end)) end = _gtk_pango_move_sentences (layout, end, 1); - while (!attrs[end].is_sentence_end && end < n_attrs - 1) + while (!attrs[end].is_sentence_start && end < n_attrs - 1) end = _gtk_pango_move_chars (layout, end, 1); start = end; if (end < n_attrs - 1) @@ -1245,7 +1245,7 @@ _gtk_pango_get_text_at (PangoLayout *layout, if (_gtk_pango_is_inside_word (layout, end)) end = _gtk_pango_move_words (layout, end, 1); while (!attrs[end].is_word_start && end < n_attrs - 1) - end = _gtk_pango_move_chars (layout, end, -1); + end = _gtk_pango_move_chars (layout, end, 1); break; case ATK_TEXT_BOUNDARY_WORD_END: @@ -1262,7 +1262,7 @@ _gtk_pango_get_text_at (PangoLayout *layout, start = _gtk_pango_move_sentences (layout, start, -1); if (_gtk_pango_is_inside_sentence (layout, end)) end = _gtk_pango_move_sentences (layout, end, 1); - while (!attrs[end].is_word_end && end < n_attrs - 1) + while (!attrs[end].is_sentence_start && end < n_attrs - 1) end = _gtk_pango_move_chars (layout, end, 1); break; |