mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-24 12:41:16 +00:00
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.
This commit is contained in:
parent
2f49fbd6cd
commit
ea54ff623e
@ -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.
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user