summaryrefslogtreecommitdiff
path: root/gtk/gtkpango.c
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2011-11-19 19:28:48 -0500
committerMatthias Clasen <mclasen@redhat.com>2011-11-19 19:28:48 -0500
commitc3d96ff2c0bca78c8caafc7a853186362900af19 (patch)
tree1a9b2d148064276a91af71de2ca9ec84c3c4fec7 /gtk/gtkpango.c
parentbcc98cf14cc77d1a7d45a3bbcd0179250e9a7fc9 (diff)
downloadgtk+-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.c8
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;