# HG changeset patch # User Tim Ringenbach # Date 1112923910 0 # Node ID ccf5e33e3239a875e824c7c23bf19232e2cce9d1 # Parent 643f458f84145f3ca046b0ca24e3dad94bd34a34 [gaim-migrate @ 12435] this should fix the infinite looping. I bet we still infinite loop in the debug window, but the fix for that is obvious, don't have debug statements in the expose event :P Someone should double check this code works right in say, rtl languages and stuff, and genereally look for bugs. committer: Tailor Script diff -r 643f458f8414 -r ccf5e33e3239 src/gtkimhtml.c --- a/src/gtkimhtml.c Thu Apr 07 15:30:16 2005 +0000 +++ b/src/gtkimhtml.c Fri Apr 08 01:31:50 2005 +0000 @@ -579,6 +579,10 @@ while (gtk_text_iter_in_range(&cur, &start, &end)) { tags = gtk_text_iter_get_tags(&cur); + gaim_debug_info("gtkimhtml", "cur = %d, start = %d, end = %d\n", + gtk_text_iter_get_offset(&cur), gtk_text_iter_get_offset(&start), + gtk_text_iter_get_offset(&end)); + for (l = tags; l; l = l->next) { GtkTextTag *tag = l->data; GdkRectangle rect; @@ -635,7 +639,7 @@ } g_slist_free(tags); - gtk_text_iter_forward_to_tag_toggle(&cur, NULL); + while (gtk_text_iter_forward_to_tag_toggle(&cur, NULL) && gtk_text_iter_begins_tag(&cur, NULL)); } #if 0 while (l) {