[gaim-migrate @ 12435]

Fri, 08 Apr 2005 01:31:50 +0000

author
Tim Ringenbach <marv@pidgin.im>
date
Fri, 08 Apr 2005 01:31:50 +0000
changeset 10793
87783d563e90
parent 10792
2fd8ed3484d4
child 10794
93ab4be6993e

[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.

src/gtkimhtml.c file | annotate | diff | comparison | revisions
--- 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) {

mercurial