]> Pileus Git - ~andy/gtk/commitdiff
Revalidate the iter. (#156924, Murray Cumming)
authorMatthias Clasen <mclasen@redhat.com>
Mon, 1 Nov 2004 19:57:13 +0000 (19:57 +0000)
committerMatthias Clasen <matthiasc@src.gnome.org>
Mon, 1 Nov 2004 19:57:13 +0000 (19:57 +0000)
2004-11-01  Matthias Clasen  <mclasen@redhat.com>

* gtk/gtktextbuffer.c (gtk_text_buffer_backspace): Revalidate the
iter.  (#156924, Murray Cumming)

ChangeLog
ChangeLog.pre-2-10
ChangeLog.pre-2-6
ChangeLog.pre-2-8
gtk/gtktextbuffer.c

index e877e178ae4e30d8760e25035ab57f5670a15b45..86578eb5f28470e1cd4487480de95cc1017bc087 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2004-11-01  Matthias Clasen  <mclasen@redhat.com>
 
+       * gtk/gtktextbuffer.c (gtk_text_buffer_backspace): Revalidate the
+       iter.  (#156924, Murray Cumming)
+
        * gdk/x11/gdkevents-x11.c (gdk_wm_protocols_filter): Don't crash on
        broken ClientMessage events.  (#157056, Owen Taylor)
 
index e877e178ae4e30d8760e25035ab57f5670a15b45..86578eb5f28470e1cd4487480de95cc1017bc087 100644 (file)
@@ -1,5 +1,8 @@
 2004-11-01  Matthias Clasen  <mclasen@redhat.com>
 
+       * gtk/gtktextbuffer.c (gtk_text_buffer_backspace): Revalidate the
+       iter.  (#156924, Murray Cumming)
+
        * gdk/x11/gdkevents-x11.c (gdk_wm_protocols_filter): Don't crash on
        broken ClientMessage events.  (#157056, Owen Taylor)
 
index e877e178ae4e30d8760e25035ab57f5670a15b45..86578eb5f28470e1cd4487480de95cc1017bc087 100644 (file)
@@ -1,5 +1,8 @@
 2004-11-01  Matthias Clasen  <mclasen@redhat.com>
 
+       * gtk/gtktextbuffer.c (gtk_text_buffer_backspace): Revalidate the
+       iter.  (#156924, Murray Cumming)
+
        * gdk/x11/gdkevents-x11.c (gdk_wm_protocols_filter): Don't crash on
        broken ClientMessage events.  (#157056, Owen Taylor)
 
index e877e178ae4e30d8760e25035ab57f5670a15b45..86578eb5f28470e1cd4487480de95cc1017bc087 100644 (file)
@@ -1,5 +1,8 @@
 2004-11-01  Matthias Clasen  <mclasen@redhat.com>
 
+       * gtk/gtktextbuffer.c (gtk_text_buffer_backspace): Revalidate the
+       iter.  (#156924, Murray Cumming)
+
        * gdk/x11/gdkevents-x11.c (gdk_wm_protocols_filter): Don't crash on
        broken ClientMessage events.  (#157056, Owen Taylor)
 
index 96f2bc68170775986b7ec3b7d7c5c57bcc3f4811..ebcd2d42f57ad6c2b3322cd43dae4930c4c4c23f 100644 (file)
@@ -629,7 +629,7 @@ gtk_text_buffer_insert_at_cursor (GtkTextBuffer *buffer,
  * @len: length of text in bytes, or -1
  * @default_editable: default editability of buffer
  *
- * Like gtk_text_buffer_insert (), but the insertion will not occur if
+ * Like gtk_text_buffer_insert(), but the insertion will not occur if
  * @iter is at a non-editable location in the buffer.  Usually you
  * want to prevent insertions at ineditable locations if the insertion
  * results from a user action (is interactive).
@@ -3322,12 +3322,14 @@ gtk_text_buffer_delete_selection (GtkTextBuffer *buffer,
  * key with the cursor at the position specified by @iter. In the
  * normal case a single character will be deleted, but when
  * combining accents are involved, more than one character can
- * be deleted, and when precomposed character and accent combinations,
- * less than one character will be deleted.
- *
- * @iter must be at a cursor position.
+ * be deleted, and when precomposed character and accent combinations
+ * are involved, less than one character will be deleted.
+ * 
+ * Because the buffer is modified, all outstanding iterators become 
+ * invalid after calling this function; however, the @iter will be
+ * re-initialized to point to the location where text was deleted. 
  *
- * Return value: %TRUE if tbe buffer was modified
+ * Return value: %TRUE if the buffer was modified
 
  * Since: 2.6
  **/
@@ -3402,6 +3404,9 @@ gtk_text_buffer_backspace (GtkTextBuffer *buffer,
   
   g_free (cluster_text);
 
+  /* Revalidate the users iter */
+  *iter = start;
+
   return retval;
 }