Index: gtk/gtktextbuffer.c
===================================================================
--- gtk/gtktextbuffer.c	(revision 18950)
+++ gtk/gtktextbuffer.c	(working copy)
@@ -1724,7 +1724,12 @@
 
           gtk_text_buffer_emit_delete (buffer, &start, &iter);
 
-          current_state = FALSE;
+	  /* It's more robust to ask for the state again then to assume that
+	   * we're on the next not-editable segment. We don't know what the
+	   * ::delete-range handler did.... maybe it deleted the following not-editable
+	   * segment because it was associated with the editable segment.
+	   */
+	  current_state = gtk_text_iter_editable (&iter, default_editable);
           deleted_stuff = TRUE;
 
           /* revalidate user's iterators. */
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 18950)
+++ ChangeLog	(working copy)
@@ -1,3 +1,11 @@
+2007-10-28  Owen Taylor  <otaylor@redhat.com>
+
+	* gtk/gtktextbuffer.c (gtk_text_buffer_delete_interactive): Allow
+	the ::delete-range handler to delete text after the text it was
+	explicitly asked to delete without confusing us as to whether
+	we're currently on an editable or not-editable segment.
+	(#491207)
+
 2007-10-26  Cody Russell  <cody@jhu.edu>
 
 	* modules/engines/ms-windows/Theme/gtk-2.0/gtkrc:
