Index: gtk/gtktextbtree.c
===================================================================
RCS file: /cvs/gnome/gtk+/gtk/gtktextbtree.c,v
retrieving revision 1.89
diff -u -p -u -p -r1.89 gtktextbtree.c
--- gtk/gtktextbtree.c	14 May 2006 03:46:14 -0000	1.89
+++ gtk/gtktextbtree.c	5 Nov 2006 17:22:05 -0000
@@ -886,6 +886,7 @@ _gtk_text_btree_delete (GtkTextIter *sta
               start_line->segments = seg;
             }
           else if (prev_seg->next &&
+		   prev_seg->next != last_seg &&
 		   seg->type == &gtk_text_toggle_off_type &&
 		   prev_seg->next->type == &gtk_text_toggle_on_type &&
 		   seg->body.toggle.info == prev_seg->next->body.toggle.info)
