diff options
Diffstat (limited to 'src/scroll.c')
-rw-r--r-- | src/scroll.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/scroll.c b/src/scroll.c index 6c6aa4abf98..8f83851a2e0 100644 --- a/src/scroll.c +++ b/src/scroll.c @@ -22,12 +22,13 @@ Boston, MA 02111-1307, USA. */ #include <config.h> #include <stdio.h> #include <string.h> -#include "termchar.h" #include "lisp.h" +#include "termchar.h" #include "dispextern.h" #include "keyboard.h" #include "frame.h" #include "window.h" +#include "termhooks.h" /* All costs measured in characters. So no cost can exceed the area of a frame, measured in characters. @@ -100,7 +101,8 @@ calculate_scrolling (frame, matrix, window_size, lines_below, register struct matrix_elt *p, *p1; register int cost, cost1; - int lines_moved = window_size + (scroll_region_ok ? 0 : lines_below); + int lines_moved = window_size + + (FRAME_SCROLL_REGION_OK (frame) ? 0 : lines_below); /* first_insert_cost[I] is the cost of doing the first insert-line at the i'th line of the lines we are considering, where I is origin 1 (as it is below). */ @@ -466,7 +468,8 @@ calculate_direct_scrolling (frame, matrix, window_size, lines_below, /* Overhead of setting the scroll window, plus the extra cost cost of scrolling by a distance of one. The extra cost is added once for consistency with the cost vectors */ - scroll_overhead = scroll_region_cost + extra_cost; + scroll_overhead + = FRAME_SCROLL_REGION_COST (frame) + extra_cost; /* initialize the top left corner of the matrix */ matrix->writecost = 0; @@ -818,7 +821,7 @@ scrolling_1 (frame, window_size, unchanged_at_top, unchanged_at_bottom, matrix = ((struct matrix_elt *) alloca ((window_size + 1) * (window_size + 1) * sizeof *matrix)); - if (scroll_region_ok) + if (FRAME_SCROLL_REGION_OK (frame)) { calculate_direct_scrolling (frame, matrix, window_size, unchanged_at_bottom, @@ -914,7 +917,7 @@ scroll_cost (frame, from, to, amount) if (amount == 0) return 0; - if (! scroll_region_ok) + if (! FRAME_SCROLL_REGION_OK (frame)) limit = height; else if (amount > 0) limit += amount; |