# HG changeset patch # User Jim Blandy # Date 688417187 0 # Node ID 1cc29824b3f13ba5efd0805e1f2c5f32452eaa25 # Parent ba5889c7de7201869538aefa828fba2855471624 *** empty log message *** diff -r ba5889c7de72 -r 1cc29824b3f1 src/scroll.c --- 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;