Sun, 23 May 2004 06:28:29 +0000
[gaim-migrate @ 9804]
This fixes bug #958394. It makes pasting while something selected overwrite
the selection, rather than inserting it to one side of the selection.
Someone double check middle click pasting with a selection works however
it's supposed to work. Currently it replaces the selection with itself,
and deselects it as a side effect.
| src/gtkimhtml.c | file | annotate | diff | comparison | revisions |
--- a/src/gtkimhtml.c Sun May 23 05:52:24 2004 +0000 +++ b/src/gtkimhtml.c Sun May 23 06:28:29 2004 +0000 @@ -719,6 +719,9 @@ GtkTextIter iter; GtkIMHtmlOptions flags = plaintext ? 0 : GTK_IMHTML_NO_NEWLINE; + if (gtk_text_buffer_get_selection_bounds(imhtml->text_buffer, NULL, NULL)) + gtk_text_buffer_delete_selection(imhtml->text_buffer, TRUE, TRUE); + gtk_text_buffer_get_iter_at_mark(imhtml->text_buffer, &iter, gtk_text_buffer_get_insert(imhtml->text_buffer)); if (!imhtml->wbfo && !plaintext) gtk_imhtml_close_tags(imhtml, &iter);