Commit ea54ff62 authored by Matthias Clasen's avatar Matthias Clasen Committed by Matthias Clasen

Don't scroll to cursor position if we already have pending scrolls.

2004-04-20  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtktextview.c (gtk_text_view_scroll_pages):
	(gtk_text_view_scroll_hpages): Don't scroll to cursor position
	if we already have pending scrolls. Bandaid fix for #78513.
parent 2f49fbd6
......@@ -3,6 +3,9 @@
* gtk/gtktextview.c (gtk_text_view_allocate_children): Make
sure anchored children get size allocated, even if the layout
is valid. (#122323, Andrew E. Makeev)
(gtk_text_view_scroll_pages):
(gtk_text_view_scroll_hpages): Don't scroll to cursor position
if we already have pending scrolls. Bandaid fix for #78513.
Mon Apr 19 17:59:17 2004 Owen Taylor <otaylor@redhat.com>
......
......@@ -3,6 +3,9 @@
* gtk/gtktextview.c (gtk_text_view_allocate_children): Make
sure anchored children get size allocated, even if the layout
is valid. (#122323, Andrew E. Makeev)
(gtk_text_view_scroll_pages):
(gtk_text_view_scroll_hpages): Don't scroll to cursor position
if we already have pending scrolls. Bandaid fix for #78513.
Mon Apr 19 17:59:17 2004 Owen Taylor <otaylor@redhat.com>
......
......@@ -3,6 +3,9 @@
* gtk/gtktextview.c (gtk_text_view_allocate_children): Make
sure anchored children get size allocated, even if the layout
is valid. (#122323, Andrew E. Makeev)
(gtk_text_view_scroll_pages):
(gtk_text_view_scroll_hpages): Don't scroll to cursor position
if we already have pending scrolls. Bandaid fix for #78513.
Mon Apr 19 17:59:17 2004 Owen Taylor <otaylor@redhat.com>
......
......@@ -3,6 +3,9 @@
* gtk/gtktextview.c (gtk_text_view_allocate_children): Make
sure anchored children get size allocated, even if the layout
is valid. (#122323, Andrew E. Makeev)
(gtk_text_view_scroll_pages):
(gtk_text_view_scroll_hpages): Don't scroll to cursor position
if we already have pending scrolls. Bandaid fix for #78513.
Mon Apr 19 17:59:17 2004 Owen Taylor <otaylor@redhat.com>
......
......@@ -3,6 +3,9 @@
* gtk/gtktextview.c (gtk_text_view_allocate_children): Make
sure anchored children get size allocated, even if the layout
is valid. (#122323, Andrew E. Makeev)
(gtk_text_view_scroll_pages):
(gtk_text_view_scroll_hpages): Don't scroll to cursor position
if we already have pending scrolls. Bandaid fix for #78513.
Mon Apr 19 17:59:17 2004 Owen Taylor <otaylor@redhat.com>
......
......@@ -4813,17 +4813,19 @@ gtk_text_view_scroll_pages (GtkTextView *text_view,
gint y0, y1;
g_return_if_fail (text_view->vadjustment != NULL);
cancel_pending_scroll (text_view);
adj = text_view->vadjustment;
/* Make sure we start from the current cursor position, even
* if it was offscreen.
* if it was offscreen, but don't queue more scrolls if we're
* already behind.
*/
gtk_text_view_scroll_mark_onscreen (text_view,
gtk_text_buffer_get_mark (get_buffer (text_view),
"insert"));
if (text_view->pending_scroll)
cancel_pending_scroll (text_view);
else
gtk_text_view_scroll_mark_onscreen (text_view,
gtk_text_buffer_get_mark (get_buffer (text_view),
"insert"));
/* Validate the region that will be brought into view by the cursor motion
*/
......@@ -4897,16 +4899,18 @@ gtk_text_view_scroll_hpages (GtkTextView *text_view,
g_return_if_fail (text_view->hadjustment != NULL);
cancel_pending_scroll (text_view);
adj = text_view->hadjustment;
/* Make sure we start from the current cursor position, even
* if it was offscreen.
* if it was offscreen, but don't queue more scrolls if we're
* already behind.
*/
gtk_text_view_scroll_mark_onscreen (text_view,
gtk_text_buffer_get_mark (get_buffer (text_view),
"insert"));
if (text_view->pending_scroll)
cancel_pending_scroll (text_view);
else
gtk_text_view_scroll_mark_onscreen (text_view,
gtk_text_buffer_get_mark (get_buffer (text_view),
"insert"));
/* Validate the line that we're moving within.
*/
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment