From: Eli Zaretskii Date: Fri, 9 Dec 2011 18:40:42 +0000 (+0200) Subject: Fix bug #10170 with extra scrolling after C-s. X-Git-Tag: emacs-pretest-24.0.93~201 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=7cd4e72cff31ec6a28d9e63c4d390d478d8619f1;p=emacs.git Fix bug #10170 with extra scrolling after C-s. src/xdisp.c (try_scrolling): Don't set scroll_down_p if dy is zero. --- diff --git a/src/ChangeLog b/src/ChangeLog index 44f80ae4098..026aa6f0d04 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2011-12-09 Eli Zaretskii + + * xdisp.c (try_scrolling): Don't set scroll_down_p if dy is zero. + (Bug#10170) + 2011-12-09 YAMAMOTO Mitsuharu * unexelf.c (unexec) [NS_IMPL_GNUSTEP]: Take account of the case diff --git a/src/xdisp.c b/src/xdisp.c index 3ac5651975b..87bbded9208 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -14360,7 +14360,7 @@ try_scrolling (Lisp_Object window, int just_this_one_p, { int scroll_margin_y; - /* Compute the pixel ypos of the scroll margin, then move it to + /* Compute the pixel ypos of the scroll margin, then move IT to either that ypos or PT, whichever comes first. */ start_display (&it, w, startp); scroll_margin_y = it.last_visible_y - this_scroll_margin @@ -14390,7 +14390,8 @@ try_scrolling (Lisp_Object window, int just_this_one_p, if (dy > scroll_max) return SCROLLING_FAILED; - scroll_down_p = 1; + if (dy > 0) + scroll_down_p = 1; } }