# HG changeset patch # User Tim Ringenbach # Date 1085293709 0 # Node ID 6fd7de3576721a1d4ce992dfde0168ed9c11dedf # Parent 1bd8bda384e74c683dd5ed5c45197dde7879955a [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. committer: Tailor Script diff -r 1bd8bda384e7 -r 6fd7de357672 src/gtkimhtml.c --- 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);