diff options
author | Sébastien Wilmet <swilmet@gnome.org> | 2013-04-03 13:41:44 +0200 |
---|---|---|
committer | Sébastien Wilmet <swilmet@gnome.org> | 2013-06-20 20:22:56 +0200 |
commit | 08d49fdd5821e18d9946ad975b04f233b22cfdd7 (patch) | |
tree | b99d4688bf56196873e3c3188c2093a0623a603d /gtk/gtktextiter.c | |
parent | 555e0a785d84e6f39f3d6b467caafbe262296c7c (diff) | |
download | gtk+-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.c | 3 |
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); |