mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-11 19:30:10 +00:00
Merge branch 'paste-scrolling' into 'master'
textview: Don't scroll for pastes in another view See merge request GNOME/gtk!152
This commit is contained in:
commit
1d368b0cd8
@ -1639,7 +1639,7 @@ gtk_text_view_init (GtkTextView *text_view)
|
||||
priv->tabs = NULL;
|
||||
priv->editable = TRUE;
|
||||
|
||||
priv->scroll_after_paste = TRUE;
|
||||
priv->scroll_after_paste = FALSE;
|
||||
|
||||
gtk_drag_dest_set (widget, 0, NULL,
|
||||
GDK_ACTION_COPY | GDK_ACTION_MOVE);
|
||||
@ -5116,10 +5116,6 @@ gtk_text_view_multipress_gesture_pressed (GtkGestureMultiPress *gesture,
|
||||
else if (button == GDK_BUTTON_MIDDLE &&
|
||||
get_middle_click_paste (text_view))
|
||||
{
|
||||
/* We do not want to scroll back to the insert iter when we paste
|
||||
with the middle button */
|
||||
priv->scroll_after_paste = FALSE;
|
||||
|
||||
get_iter_from_gesture (text_view, GTK_GESTURE (gesture),
|
||||
&iter, NULL, NULL);
|
||||
gtk_text_buffer_paste_clipboard (get_buffer (text_view),
|
||||
@ -6599,6 +6595,8 @@ gtk_text_view_paste_clipboard (GtkTextView *text_view)
|
||||
{
|
||||
GdkClipboard *clipboard = gtk_widget_get_clipboard (GTK_WIDGET (text_view));
|
||||
|
||||
text_view->priv->scroll_after_paste = TRUE;
|
||||
|
||||
gtk_text_buffer_paste_clipboard (get_buffer (text_view),
|
||||
clipboard,
|
||||
NULL,
|
||||
@ -6621,7 +6619,7 @@ gtk_text_view_paste_done_handler (GtkTextBuffer *buffer,
|
||||
gtk_text_view_scroll_mark_onscreen (text_view, gtk_text_buffer_get_insert (buffer));
|
||||
}
|
||||
|
||||
priv->scroll_after_paste = TRUE;
|
||||
priv->scroll_after_paste = FALSE;
|
||||
}
|
||||
|
||||
static void
|
||||
|
Loading…
Reference in New Issue
Block a user