From 6924d3b7d387c74edf23eac389d21e73ef733f5b Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Sat, 22 May 2004 22:11:24 +0000 Subject: [PATCH] (try_scrolling): If scroll-up-aggressively or scroll-down-aggressively is small but positive, put point near the screen edge. --- src/xdisp.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) 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) -- 2.39.5