summaryrefslogtreecommitdiff
path: root/src/scroll.c
diff options
context:
space:
mode:
authorJim Blandy <jimb@redhat.com>1991-10-25 18:59:47 +0000
committerJim Blandy <jimb@redhat.com>1991-10-25 18:59:47 +0000
commitb278b898435bfe3ed3dcc98a164e6f751c961fe4 (patch)
tree256f33af5b00bae422f46ef2df6555bf108dc77c /src/scroll.c
parentcc09aeb6d37893c67a6f6935caf8a4f316aa73d3 (diff)
downloademacs-b278b898435bfe3ed3dcc98a164e6f751c961fe4.tar.gz
*** empty log message ***
Diffstat (limited to 'src/scroll.c')
-rw-r--r--src/scroll.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/scroll.c b/src/scroll.c
index 635ca22655e..7432a3ea06c 100644
--- a/src/scroll.c
+++ b/src/scroll.c
@@ -447,14 +447,14 @@ scroll_cost (screen, from, to, amount)
int offset;
int height = SCREEN_HEIGHT (screen);
- if (amount > 0)
- limit += amount;
- if (! scroll_region_ok)
- limit = height;
-
if (amount == 0)
return 0;
+ if (! scroll_region_ok)
+ limit = height;
+ else if (amount > 0)
+ limit += amount;
+
if (amount < 0)
{
int temp = to;
@@ -487,7 +487,7 @@ line_ins_del (screen, ov1, pf1, ovn, pfn, ov, mf)
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;