aboutsummaryrefslogtreecommitdiffstats
path: root/src/scroll.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/scroll.c')
-rw-r--r--src/scroll.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/scroll.c b/src/scroll.c
index 6c6aa4abf98..a786d3c2cf4 100644
--- a/src/scroll.c
+++ b/src/scroll.c
@@ -100,7 +100,8 @@ calculate_scrolling (frame, matrix, window_size, lines_below,
100 register struct matrix_elt *p, *p1; 100 register struct matrix_elt *p, *p1;
101 register int cost, cost1; 101 register int cost, cost1;
102 102
103 int lines_moved = window_size + (scroll_region_ok ? 0 : lines_below); 103 int lines_moved = window_size
104 + (TERMINAL_SCROLL_REGION_OK (CURRENT_TERMINAL ()) ? 0 : lines_below);
104 /* first_insert_cost[I] is the cost of doing the first insert-line 105 /* first_insert_cost[I] is the cost of doing the first insert-line
105 at the i'th line of the lines we are considering, 106 at the i'th line of the lines we are considering,
106 where I is origin 1 (as it is below). */ 107 where I is origin 1 (as it is below). */
@@ -466,7 +467,8 @@ calculate_direct_scrolling (frame, matrix, window_size, lines_below,
466 /* Overhead of setting the scroll window, plus the extra cost 467 /* Overhead of setting the scroll window, plus the extra cost
467 cost of scrolling by a distance of one. The extra cost is 468 cost of scrolling by a distance of one. The extra cost is
468 added once for consistency with the cost vectors */ 469 added once for consistency with the cost vectors */
469 scroll_overhead = scroll_region_cost + extra_cost; 470 scroll_overhead
471 = TERMINAL_SCROLL_REGION_COST (CURRENT_TERMINAL ()) + extra_cost;
470 472
471 /* initialize the top left corner of the matrix */ 473 /* initialize the top left corner of the matrix */
472 matrix->writecost = 0; 474 matrix->writecost = 0;
@@ -818,7 +820,7 @@ scrolling_1 (frame, window_size, unchanged_at_top, unchanged_at_bottom,
818 matrix = ((struct matrix_elt *) 820 matrix = ((struct matrix_elt *)
819 alloca ((window_size + 1) * (window_size + 1) * sizeof *matrix)); 821 alloca ((window_size + 1) * (window_size + 1) * sizeof *matrix));
820 822
821 if (scroll_region_ok) 823 if (TERMINAL_SCROLL_REGION_OK (CURRENT_TERMINAL ()))
822 { 824 {
823 calculate_direct_scrolling (frame, matrix, window_size, 825 calculate_direct_scrolling (frame, matrix, window_size,
824 unchanged_at_bottom, 826 unchanged_at_bottom,
@@ -914,7 +916,7 @@ scroll_cost (frame, from, to, amount)
914 if (amount == 0) 916 if (amount == 0)
915 return 0; 917 return 0;
916 918
917 if (! scroll_region_ok) 919 if (! TERMINAL_SCROLL_REGION_OK (CURRENT_TERMINAL ()))
918 limit = height; 920 limit = height;
919 else if (amount > 0) 921 else if (amount > 0)
920 limit += amount; 922 limit += amount;