aboutsummaryrefslogtreecommitdiffstats
path: root/src/scroll.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/scroll.c')
-rw-r--r--src/scroll.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/scroll.c b/src/scroll.c
index a786d3c2cf4..f4faca2fad8 100644
--- a/src/scroll.c
+++ b/src/scroll.c
@@ -22,6 +22,7 @@ Boston, MA 02111-1307, USA. */
22#include <config.h> 22#include <config.h>
23#include <stdio.h> 23#include <stdio.h>
24#include <string.h> 24#include <string.h>
25#include "systty.h" /* For emacs_tty in termchar.h */
25#include "termchar.h" 26#include "termchar.h"
26#include "lisp.h" 27#include "lisp.h"
27#include "dispextern.h" 28#include "dispextern.h"
@@ -101,7 +102,7 @@ calculate_scrolling (frame, matrix, window_size, lines_below,
101 register int cost, cost1; 102 register int cost, cost1;
102 103
103 int lines_moved = window_size 104 int lines_moved = window_size
104 + (TERMINAL_SCROLL_REGION_OK (CURRENT_TERMINAL ()) ? 0 : lines_below); 105 + (TTY_SCROLL_REGION_OK (FRAME_TTY (frame)) ? 0 : lines_below);
105 /* first_insert_cost[I] is the cost of doing the first insert-line 106 /* first_insert_cost[I] is the cost of doing the first insert-line
106 at the i'th line of the lines we are considering, 107 at the i'th line of the lines we are considering,
107 where I is origin 1 (as it is below). */ 108 where I is origin 1 (as it is below). */
@@ -468,7 +469,7 @@ calculate_direct_scrolling (frame, matrix, window_size, lines_below,
468 cost of scrolling by a distance of one. The extra cost is 469 cost of scrolling by a distance of one. The extra cost is
469 added once for consistency with the cost vectors */ 470 added once for consistency with the cost vectors */
470 scroll_overhead 471 scroll_overhead
471 = TERMINAL_SCROLL_REGION_COST (CURRENT_TERMINAL ()) + extra_cost; 472 = TTY_SCROLL_REGION_COST (FRAME_TTY (frame)) + extra_cost;
472 473
473 /* initialize the top left corner of the matrix */ 474 /* initialize the top left corner of the matrix */
474 matrix->writecost = 0; 475 matrix->writecost = 0;
@@ -820,7 +821,7 @@ scrolling_1 (frame, window_size, unchanged_at_top, unchanged_at_bottom,
820 matrix = ((struct matrix_elt *) 821 matrix = ((struct matrix_elt *)
821 alloca ((window_size + 1) * (window_size + 1) * sizeof *matrix)); 822 alloca ((window_size + 1) * (window_size + 1) * sizeof *matrix));
822 823
823 if (TERMINAL_SCROLL_REGION_OK (CURRENT_TERMINAL ())) 824 if (TTY_SCROLL_REGION_OK (FRAME_TTY (frame)))
824 { 825 {
825 calculate_direct_scrolling (frame, matrix, window_size, 826 calculate_direct_scrolling (frame, matrix, window_size,
826 unchanged_at_bottom, 827 unchanged_at_bottom,
@@ -916,7 +917,7 @@ scroll_cost (frame, from, to, amount)
916 if (amount == 0) 917 if (amount == 0)
917 return 0; 918 return 0;
918 919
919 if (! TERMINAL_SCROLL_REGION_OK (CURRENT_TERMINAL ())) 920 if (! TTY_SCROLL_REGION_OK (FRAME_TTY (frame)))
920 limit = height; 921 limit = height;
921 else if (amount > 0) 922 else if (amount > 0)
922 limit += amount; 923 limit += amount;