changeset 421:1cc29824b3f1

*** empty log message ***
author Jim Blandy <jimb@redhat.com>
date Fri, 25 Oct 1991 18:59:47 +0000
parents ba5889c7de72
children 5abb8aac7c6b
files src/scroll.c
diffstat 1 files changed, 6 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/src/scroll.c	Tue Oct 22 00:26:51 1991 +0000
+++ b/src/scroll.c	Fri Oct 25 18:59:47 1991 +0000
@@ -447,13 +447,13 @@
   int offset;
   int height = SCREEN_HEIGHT (screen);
 
-  if (amount > 0)
-    limit += amount;
+  if (amount == 0)
+    return 0;
+
   if (! scroll_region_ok)
     limit = height;
-
-  if (amount == 0)
-    return 0;
+  else if (amount > 0)
+    limit += amount;
 
   if (amount < 0)
     {
@@ -487,7 +487,7 @@
   register int insert_overhead = ov1 * 10;
   register int next_insert_cost = ovn * 10;
 
-  for (i = 0; i <= screen_height; i++)
+  for (i = 0; i < screen_height; i++)
     {
       mf[screen_height - i] = next_insert_cost / 10;
       next_insert_cost += pfn;