diff --git a/src/vte-private.h b/src/vte-private.h
index cc19614..269901f 100644
--- a/src/vte-private.h
+++ b/src/vte-private.h
@@ -368,6 +368,9 @@ struct _VteTerminalPrivate {
 	gboolean cursor_moved_pending;
 	gboolean contents_changed_pending;
 
+       /* Scroll delta of the scrollbar */
+       long active_screen_scroll_delta;
+
 	/* window name changes */
         gchar *window_title;
 	gchar *window_title_changed;
diff --git a/src/vte.c b/src/vte.c
index 0890a6d..d4a5946 100644
--- a/src/vte.c
+++ b/src/vte.c
@@ -1788,26 +1788,24 @@ vte_terminal_queue_adjustment_changed(VteTerminal *terminal)
 }
 
 static void
-vte_terminal_queue_adjustment_value_changed(VteTerminal *terminal, glong v)
+vte_terminal_queue_adjustment_value_changed(VteTerminal *terminal)
 {
-	if (v != terminal->pvt->screen->scroll_delta) {
-		terminal->pvt->screen->scroll_delta = v;
+        if (terminal->pvt->screen->scroll_delta != terminal->pvt->active_screen_scroll_delta) {
+                terminal->pvt->active_screen_scroll_delta = terminal->pvt->screen->scroll_delta;
 		terminal->pvt->adjustment_value_changed_pending = TRUE;
 		add_update_timeout (terminal);
 	}
 }
 
 static void
-vte_terminal_queue_adjustment_value_changed_clamped(VteTerminal *terminal, glong v)
+vte_terminal_set_scroll_delta_clamped(VteTerminal *terminal, glong v)
 {
 	gdouble lower, upper;
 
 	lower = gtk_adjustment_get_lower(terminal->pvt->vadjustment);
 	upper = gtk_adjustment_get_upper(terminal->pvt->vadjustment);
 
-	v = CLAMP(v, lower, MAX (lower, upper - terminal->pvt->row_count));
-
-	vte_terminal_queue_adjustment_value_changed (terminal, v);
+        terminal->pvt->screen->scroll_delta = CLAMP(v, lower, MAX (lower, upper - terminal->pvt->row_count));
 }
 
 
@@ -1833,8 +1831,8 @@ _vte_terminal_adjust_adjustments(VteTerminal *terminal)
 					 screen->insert_delta);
 
 	if (screen->scroll_delta > screen->insert_delta) {
-		vte_terminal_queue_adjustment_value_changed(terminal,
-				screen->insert_delta);
+                screen->scroll_delta = screen->insert_delta;
+                vte_terminal_queue_adjustment_value_changed (terminal);
 	}
 }
 
@@ -1905,7 +1903,8 @@ vte_terminal_scroll_lines(VteTerminal *terminal, gint lines)
 	destination = terminal->pvt->screen->scroll_delta;
 	destination += lines;
 	/* Tell the scrollbar to adjust itself. */
-	vte_terminal_queue_adjustment_value_changed_clamped (terminal, destination);
+        vte_terminal_set_scroll_delta_clamped (terminal, destination);
+        vte_terminal_queue_adjustment_value_changed (terminal);
 }
 
 /* Scroll a fixed number of pages up or down, in the current screen. */
@@ -1919,16 +1918,15 @@ vte_terminal_scroll_pages(VteTerminal *terminal, gint pages)
 static void
 vte_terminal_maybe_scroll_to_top(VteTerminal *terminal)
 {
-	vte_terminal_queue_adjustment_value_changed (terminal,
-			_vte_ring_delta(terminal->pvt->screen->row_data));
+        terminal->pvt->screen->scroll_delta = _vte_ring_delta(terminal->pvt->screen->row_data);
+        vte_terminal_queue_adjustment_value_changed (terminal);
 }
 
 static void
 vte_terminal_maybe_scroll_to_bottom(VteTerminal *terminal)
 {
-	glong delta;
-	delta = terminal->pvt->screen->insert_delta;
-	vte_terminal_queue_adjustment_value_changed (terminal, delta);
+        terminal->pvt->screen->scroll_delta = terminal->pvt->screen->insert_delta;
+        vte_terminal_queue_adjustment_value_changed (terminal);
 	_vte_debug_print(VTE_DEBUG_ADJ,
 			"Snapping to bottom of screen\n");
 }
@@ -6858,7 +6856,8 @@ vte_terminal_autoscroll(VteTerminal *terminal)
 		if (terminal->pvt->vadjustment) {
 			/* Try to scroll up by one line. */
 			adj = terminal->pvt->screen->scroll_delta - 1;
-			vte_terminal_queue_adjustment_value_changed_clamped (terminal, adj);
+                        vte_terminal_set_scroll_delta_clamped (terminal, adj);
+                        vte_terminal_queue_adjustment_value_changed (terminal);
 			extend = TRUE;
 		}
 		_vte_debug_print(VTE_DEBUG_EVENTS, "Autoscrolling down.\n");
@@ -6868,7 +6867,8 @@ vte_terminal_autoscroll(VteTerminal *terminal)
 		if (terminal->pvt->vadjustment) {
 			/* Try to scroll up by one line. */
 			adj = terminal->pvt->screen->scroll_delta + 1;
-			vte_terminal_queue_adjustment_value_changed_clamped (terminal, adj);
+                        vte_terminal_set_scroll_delta_clamped (terminal, adj);
+                        vte_terminal_queue_adjustment_value_changed (terminal);
 			extend = TRUE;
 		}
 		_vte_debug_print(VTE_DEBUG_EVENTS, "Autoscrolling up.\n");
@@ -7655,7 +7655,6 @@ vte_terminal_screen_set_size(VteTerminal *terminal, VteScreen *screen, glong old
 	gboolean was_scrolled_to_top = (screen->scroll_delta == _vte_ring_delta(ring));
 	gboolean was_scrolled_to_bottom = (screen->scroll_delta == screen->insert_delta);
 	glong old_top_lines;
-	glong new_scroll_delta;
 
 	_vte_debug_print(VTE_DEBUG_RESIZE,
 			"Resizing %s screen\n"
@@ -7663,8 +7662,8 @@ vte_terminal_screen_set_size(VteTerminal *terminal, VteScreen *screen, glong old
 			"     cursor_current (absolute)  row=%ld  (visual line %ld)  col=%ld\n"
 			"     cursor_saved (relative to insert_delta)  row=%ld  col=%ld\n",
 			screen == &terminal->pvt->normal_screen ? "normal" : "alternate",
-			screen->insert_delta, screen->scroll_delta,
-			screen->cursor_current.row, screen->cursor_current.row - screen->scroll_delta + 1, screen->cursor_current.col,
+                        screen->insert_delta, screen->scroll_delta,
+                        screen->cursor_current.row, screen->cursor_current.row - screen->scroll_delta + 1, screen->cursor_current.col,
 			screen->cursor_saved.row, screen->cursor_saved.col);
 
 	screen->scrolling_restricted = FALSE;
@@ -7727,7 +7726,7 @@ vte_terminal_screen_set_size(VteTerminal *terminal, VteScreen *screen, glong old
 	if (_vte_ring_length(ring) <= terminal->pvt->row_count) {
 		/* Everything fits without scrollbars. Align at top. */
 		screen->insert_delta = _vte_ring_delta(ring);
-		new_scroll_delta = screen->insert_delta;
+                screen->scroll_delta = screen->insert_delta;
 		_vte_debug_print(VTE_DEBUG_RESIZE,
 				"Everything fits without scrollbars\n");
 	} else {
@@ -7735,12 +7734,12 @@ vte_terminal_screen_set_size(VteTerminal *terminal, VteScreen *screen, glong old
 		screen->insert_delta = _vte_ring_next(ring) - terminal->pvt->row_count;
 		if (was_scrolled_to_bottom) {
 			/* Was scrolled to bottom, keep this way. */
-			new_scroll_delta = screen->insert_delta;
+                        screen->scroll_delta = screen->insert_delta;
 			_vte_debug_print(VTE_DEBUG_RESIZE,
 					"Scroll to bottom\n");
 		} else if (was_scrolled_to_top) {
 			/* Was scrolled to top, keep this way. Not sure if this special case is worth it. */
-			new_scroll_delta = _vte_ring_delta(ring);
+                        screen->scroll_delta = _vte_ring_delta(ring);
 			_vte_debug_print(VTE_DEBUG_RESIZE,
 					"Scroll to top\n");
 		} else {
@@ -7751,7 +7750,7 @@ vte_terminal_screen_set_size(VteTerminal *terminal, VteScreen *screen, glong old
 			   line break will stay there.
 			   TODO: What would be the best behavior if the bottom of the screen is a
 			   soft line break, i.e. only a partial line is visible at the bottom? */
-			new_scroll_delta = below_viewport.row - terminal->pvt->row_count;
+                        screen->scroll_delta = below_viewport.row - terminal->pvt->row_count;
 			_vte_debug_print(VTE_DEBUG_RESIZE,
 					"Scroll so bottom row stays\n");
 		}
@@ -7766,16 +7765,11 @@ vte_terminal_screen_set_size(VteTerminal *terminal, VteScreen *screen, glong old
 			"New  insert_delta=%ld  scroll_delta=%ld\n"
 			"     cursor_current (absolute)  row=%ld  (visual line %ld)  col=%ld\n"
 			"     cursor_saved (relative to insert_delta)  row=%ld  col=%ld\n\n",
-			screen->insert_delta, new_scroll_delta,
-			screen->cursor_current.row, screen->cursor_current.row - new_scroll_delta + 1, screen->cursor_current.col,
+                        screen->insert_delta, screen->scroll_delta,
+                        screen->cursor_current.row, screen->cursor_current.row - screen->scroll_delta + 1, screen->cursor_current.col,
 			screen->cursor_saved.row, screen->cursor_saved.col);
 
-	if (screen == terminal->pvt->screen)
-		vte_terminal_queue_adjustment_value_changed (
-				terminal,
-				new_scroll_delta);
-	else
-		screen->scroll_delta = new_scroll_delta;
+        vte_terminal_queue_adjustment_value_changed (terminal);
 }
 
 /**
@@ -7969,6 +7963,7 @@ vte_terminal_init(VteTerminal *terminal)
 
         vte_terminal_set_hadjustment(terminal, NULL);
 	vte_terminal_set_vadjustment(terminal, NULL);
+        pvt->active_screen_scroll_delta = 0;
 
 	/* Set up dummy metrics, value != 0 to avoid division by 0 */
 	terminal->pvt->char_width = 1;
@@ -10501,7 +10496,8 @@ vte_terminal_scroll(GtkWidget *widget, GdkEventScroll *event)
 	} else {
 		/* Perform a history scroll. */
 		cnt += terminal->pvt->screen->scroll_delta;
-		vte_terminal_queue_adjustment_value_changed_clamped (terminal, cnt);
+                vte_terminal_set_scroll_delta_clamped (terminal, v);
+                vte_terminal_queue_adjustment_value_changed (terminal);
 	}
 
 	return TRUE;
@@ -12205,10 +12201,7 @@ vte_terminal_set_scrollback_lines(VteTerminal *terminal, glong lines)
 	}
 
 	/* Adjust the scrollbars to the new locations. */
-	/* Hack: force a change in scroll_delta even if the value remains, so that
-	   vte_term_q_adj_val_changed() doesn't shortcut to no-op, see bug 676075. */
-	terminal->pvt->screen->scroll_delta = -1;
-	vte_terminal_queue_adjustment_value_changed (terminal, scroll_delta);
+        vte_terminal_queue_adjustment_value_changed (terminal);
 	_vte_terminal_adjust_adjustments_full (terminal);
 
         g_object_notify(object, "scrollback-lines");
@@ -13520,11 +13513,15 @@ vte_terminal_search_rows (VteTerminal *terminal,
 	value = gtk_adjustment_get_value(terminal->pvt->vadjustment);
 	page_size = gtk_adjustment_get_page_size(terminal->pvt->vadjustment);
 	if (backward) {
-		if (end_row < value || end_row >= value + page_size)
-			vte_terminal_queue_adjustment_value_changed_clamped (terminal, end_row - page_size + 1);
+                if (end_row < value || end_row >= value + page_size) {
+                        vte_terminal_set_scroll_delta_clamped (terminal, end_row - page_size + 1);
+                        vte_terminal_queue_adjustment_value_changed (terminal);
+                }
 	} else {
-		if (start_row < value || start_row >= value + page_size)
-			vte_terminal_queue_adjustment_value_changed_clamped (terminal, start_row);
+                if (start_row < value || start_row >= value + page_size) {
+                        vte_terminal_set_scroll_delta_clamped (terminal, start_row);
+                        vte_terminal_queue_adjustment_value_changed (terminal);
+                }
 	}
 
 	return TRUE;
