diff options
-rw-r--r-- | src/fe-gtk/xtext.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/fe-gtk/xtext.c b/src/fe-gtk/xtext.c index 41fb9fdd..7867342f 100644 --- a/src/fe-gtk/xtext.c +++ b/src/fe-gtk/xtext.c @@ -1780,6 +1780,12 @@ gtk_xtext_scrolldown_timeout (GtkXText * xtext) GtkAdjustment *adj = xtext->adj; textentry *ent; + if (buf->last_ent_end == NULL) /* If context has changed */ + { + xtext->scroll_tag = 0; + return 0; + } + gdk_window_get_pointer (GTK_WIDGET (xtext)->window, 0, &p_y, 0); gdk_drawable_get_size (GTK_WIDGET (xtext)->window, 0, &win_height); @@ -1821,6 +1827,12 @@ gtk_xtext_scrollup_timeout (GtkXText * xtext) GtkAdjustment *adj = xtext->adj; textentry *ent; + if (buf->last_ent_start == NULL) /* If context has changed */ + { + xtext->scroll_tag = 0; + return 0; + } + gdk_window_get_pointer (GTK_WIDGET (xtext)->window, 0, &p_y, 0); if (p_y < 0 && adj->value >= 0) |