summaryrefslogtreecommitdiff
path: root/gtk/gtktextiter.c
diff options
context:
space:
mode:
authorSébastien Wilmet <swilmet@gnome.org>2013-04-03 13:41:44 +0200
committerSébastien Wilmet <swilmet@gnome.org>2013-06-20 20:22:56 +0200
commit08d49fdd5821e18d9946ad975b04f233b22cfdd7 (patch)
treeb99d4688bf56196873e3c3188c2093a0623a603d /gtk/gtktextiter.c
parent555e0a785d84e6f39f3d6b467caafbe262296c7c (diff)
downloadgtk+-08d49fdd5821e18d9946ad975b04f233b22cfdd7.tar.gz
Fix gtk_text_iter_forward_to_tag_toggle() for end iter
The function must return TRUE only if there is a tag toggle _after_ the iter, not _at_ the iter. So for the end iter, the function must always return FALSE. Add also unit tests for gtk_text_iter_forward_to_tag_toggle(). https://bugzilla.gnome.org/show_bug.cgi?id=691266
Diffstat (limited to 'gtk/gtktextiter.c')
-rw-r--r--gtk/gtktextiter.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/gtk/gtktextiter.c b/gtk/gtktextiter.c
index 4821c62c48..14f1e76283 100644
--- a/gtk/gtktextiter.c
+++ b/gtk/gtktextiter.c
@@ -4163,6 +4163,9 @@ gtk_text_iter_forward_to_tag_toggle (GtkTextIter *iter,
check_invariants (iter);
+ if (gtk_text_iter_is_end (iter))
+ return FALSE;
+
current_line = real->line;
next_line = _gtk_text_line_next_could_contain_tag (current_line,
real->tree, tag);