Commit 6924d3b7 authored by Richard M. Stallman's avatar Richard M. Stallman
Browse files

(try_scrolling): If scroll-up-aggressively or scroll-down-aggressively

is small but positive, put point near the screen edge.
parent ca50933a
...@@ -11002,7 +11002,12 @@ try_scrolling (window, just_this_one_p, scroll_conservatively, ...@@ -11002,7 +11002,12 @@ try_scrolling (window, just_this_one_p, scroll_conservatively,
aggressive = current_buffer->scroll_up_aggressively; aggressive = current_buffer->scroll_up_aggressively;
height = WINDOW_BOX_TEXT_HEIGHT (w); height = WINDOW_BOX_TEXT_HEIGHT (w);
if (NUMBERP (aggressive)) 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) if (amount_to_scroll <= 0)
...@@ -11060,7 +11065,12 @@ try_scrolling (window, just_this_one_p, scroll_conservatively, ...@@ -11060,7 +11065,12 @@ try_scrolling (window, just_this_one_p, scroll_conservatively,
aggressive = current_buffer->scroll_down_aggressively; aggressive = current_buffer->scroll_down_aggressively;
height = WINDOW_BOX_TEXT_HEIGHT (w); height = WINDOW_BOX_TEXT_HEIGHT (w);
if (NUMBERP (aggressive)) 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) if (amount_to_scroll <= 0)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment