diff options
| author | Jim Blandy <jimb@redhat.com> | 1991-10-25 18:59:47 +0000 |
|---|---|---|
| committer | Jim Blandy <jimb@redhat.com> | 1991-10-25 18:59:47 +0000 |
| commit | 3e2bea7c253f0393f9209b4b75f724bf0166fded (patch) | |
| tree | ba269d042757c89489fead20de5ae3b2de35c3cd | |
| parent | 4fc0b45bc4d0a189b8bb097692f5c540dcb251e8 (diff) | |
| download | emacs-3e2bea7c253f0393f9209b4b75f724bf0166fded.tar.gz | |
*** empty log message ***
| -rw-r--r-- | src/scroll.c | 12 |
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; |
