]> git.eshelyaron.com Git - emacs.git/commitdiff
(try_scrolling): If scroll-up-aggressively or scroll-down-aggressively
authorRichard M. Stallman <rms@gnu.org>
Sat, 22 May 2004 22:11:24 +0000 (22:11 +0000)
committerRichard M. Stallman <rms@gnu.org>
Sat, 22 May 2004 22:11:24 +0000 (22:11 +0000)
is small but positive, put point near the screen edge.

src/xdisp.c

index 45424db474c1ae9eec633762aecedc516e59abb6..0f7e9ac9f96bc918befcffdd96bda0c8f7e28638 100644 (file)
@@ -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)