From: Richard M. Stallman Date: Sat, 22 May 2004 22:11:24 +0000 (+0000) Subject: (try_scrolling): If scroll-up-aggressively or scroll-down-aggressively X-Git-Tag: ttn-vms-21-2-B4~6095 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=6924d3b7d387c74edf23eac389d21e73ef733f5b;p=emacs.git (try_scrolling): If scroll-up-aggressively or scroll-down-aggressively is small but positive, put point near the screen edge. --- diff --git a/src/xdisp.c b/src/xdisp.c index 45424db474c..0f7e9ac9f96 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -11002,7 +11002,12 @@ try_scrolling (window, just_this_one_p, scroll_conservatively, aggressive = current_buffer->scroll_up_aggressively; height = WINDOW_BOX_TEXT_HEIGHT (w); if (NUMBERP (aggressive)) - amount_to_scroll = XFLOATINT (aggressive) * height; + { + double float_amount = XFLOATINT (aggressive) * height; + amount_to_scroll = float_amount; + if (amount_to_scroll == 0 && float_amount > 0) + amount_to_scroll = 1; + } } if (amount_to_scroll <= 0) @@ -11060,7 +11065,12 @@ try_scrolling (window, just_this_one_p, scroll_conservatively, aggressive = current_buffer->scroll_down_aggressively; height = WINDOW_BOX_TEXT_HEIGHT (w); if (NUMBERP (aggressive)) - amount_to_scroll = XFLOATINT (aggressive) * height; + { + double float_amount = XFLOATINT (aggressive) * height; + amount_to_scroll = float_amount; + if (amount_to_scroll == 0 && float_amount > 0) + amount_to_scroll = 1; + } } if (amount_to_scroll <= 0)