From a3d0b7d19daf4b3f31105b80d4f35a1e7fe5b9c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Dj=C3=A4rv?= Date: Sun, 1 Jun 2014 20:00:56 +0200 Subject: [PATCH] Make jump scroll work with Gtk+ * xterm.c (xg_scroll_callback): Remove position, for jump set portion to min(value, whole). --- src/ChangeLog | 5 +++++ src/xterm.c | 5 +---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 23027c38c73..781e29dd308 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2014-06-01 Jan Djärv + + * xterm.c (xg_scroll_callback): Remove position, for jump set portion + to min(value, whole). + 2014-06-01 Paul Eggert Bring back the changes to GDB-visible symbols, but only on AIX. diff --git a/src/xterm.c b/src/xterm.c index d4bb2256d3b..ed98fb10b89 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -4441,14 +4441,11 @@ xg_scroll_callback (GtkRange *range, gpointer user_data) { struct scroll_bar *bar = user_data; - gdouble position; int part = -1, whole = 0, portion = 0; GtkAdjustment *adj = GTK_ADJUSTMENT (gtk_range_get_adjustment (range)); struct frame *f = g_object_get_data (G_OBJECT (range), XG_FRAME_DATA); if (xg_ignore_gtk_scrollbar) return FALSE; - position = gtk_adjustment_get_value (adj); - switch (scroll) { @@ -4460,7 +4457,7 @@ xg_scroll_callback (GtkRange *range, part = scroll_bar_handle; whole = gtk_adjustment_get_upper (adj) - gtk_adjustment_get_page_size (adj); - portion = min ((int)position, whole); + portion = min ((int)value, whole); bar->dragging = portion; } break;