]> Pileus Git - ~andy/gtk/commitdiff
Bug 592003 - Shift+click should always modify selection
authorPaolo Borelli <pborelli@gnome.org>
Mon, 17 Aug 2009 15:04:30 +0000 (17:04 +0200)
committerPaolo Borelli <pborelli@gnome.org>
Mon, 17 Aug 2009 15:07:50 +0000 (17:07 +0200)
Shift-click inside an existing selection reduces the selection to the
range from the insert mark to the clicked point instead of removing the
selection. This makes GtkTextView more consistent with GtkEntry.

gtk/gtktextview.c

index bf2d4b12b6e303b71a03da1745ef0ca0ada3c895..18da865e11436ea5c96554cd5f4d39478ff66a0c 100644 (file)
@@ -4314,7 +4314,8 @@ gtk_text_view_button_press_event (GtkWidget *widget, GdkEventButton *event)
 
           if (gtk_text_buffer_get_selection_bounds (get_buffer (text_view),
                                                     &start, &end) &&
-              gtk_text_iter_in_range (&iter, &start, &end))
+              gtk_text_iter_in_range (&iter, &start, &end) &&
+              !(event->state & GDK_SHIFT_MASK))
             {
               text_view->drag_start_x = event->x;
               text_view->drag_start_y = event->y;