diff options
author | Owen Taylor <otaylor@redhat.com> | 2007-10-28 22:27:15 +0000 |
---|---|---|
committer | Owen Taylor <otaylor@src.gnome.org> | 2007-10-28 22:27:15 +0000 |
commit | 5072e43bb28e468718b3e1d8964c3611551d92ff (patch) | |
tree | b1de7eb0399f4617061d3f187fcc4014ad3031ec /gtk/gtktextbuffer.c | |
parent | 2c47ed91d70bae327c2889302c944112037cd066 (diff) | |
download | gtk+-5072e43bb28e468718b3e1d8964c3611551d92ff.tar.gz |
Allow the ::delete-range handler to delete text after the text it was
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)
svn path=/trunk/; revision=18951
Diffstat (limited to 'gtk/gtktextbuffer.c')
-rw-r--r-- | gtk/gtktextbuffer.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/gtk/gtktextbuffer.c b/gtk/gtktextbuffer.c index 7acfcff577..bf48251152 100644 --- a/gtk/gtktextbuffer.c +++ b/gtk/gtktextbuffer.c @@ -1724,7 +1724,12 @@ gtk_text_buffer_delete_interactive (GtkTextBuffer *buffer, 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. */ |