changeset 55739:cf63ed17e21c

(try_scrolling): If scroll-up-aggressively or scroll-down-aggressively is small but positive, put point near the screen edge.
author Richard M. Stallman <rms@gnu.org>
date Sat, 22 May 2004 22:11:24 +0000
parents 69dcc9afcf6f
children eba675d00657
files src/xdisp.c
diffstat 1 files changed, 12 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/xdisp.c	Sat May 22 22:08:36 2004 +0000
+++ b/src/xdisp.c	Sat May 22 22:11:24 2004 +0000
@@ -11002,7 +11002,12 @@
 	  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 @@
 	      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)