X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/72d785653db3f07a7d918660214c62d730b47aba..7238837d023af0b6461e905af99cad1a03931f9a:/src/scroll.c diff --git a/src/scroll.c b/src/scroll.c index 915b60ab4c..5991fec004 100644 --- a/src/scroll.c +++ b/src/scroll.c @@ -23,7 +23,6 @@ Boston, MA 02111-1307, USA. */ #include #include #include "lisp.h" -#include "systty.h" /* For emacs_tty in termchar.h */ #include "termchar.h" #include "dispextern.h" #include "keyboard.h" @@ -59,10 +58,12 @@ struct matrix_elt unsigned char writecount; }; -static void do_direct_scrolling P_ ((struct glyph_matrix *, +static void do_direct_scrolling P_ ((struct frame *, + struct glyph_matrix *, struct matrix_elt *, int, int)); -static void do_scrolling P_ ((struct glyph_matrix *, +static void do_scrolling P_ ((struct frame *, + struct glyph_matrix *, struct matrix_elt *, int, int)); @@ -243,7 +244,8 @@ calculate_scrolling (frame, matrix, window_size, lines_below, of lines. */ static void -do_scrolling (current_matrix, matrix, window_size, unchanged_at_top) +do_scrolling (frame, current_matrix, matrix, window_size, unchanged_at_top) + struct frame *frame; struct glyph_matrix *current_matrix; struct matrix_elt *matrix; int window_size; @@ -310,12 +312,12 @@ do_scrolling (current_matrix, matrix, window_size, unchanged_at_top) /* Set the terminal window, if not done already. */ if (! terminal_window_p) { - set_terminal_window (window_size + unchanged_at_top); + set_terminal_window (frame, window_size + unchanged_at_top); terminal_window_p = 1; } /* Delete lines on the terminal. */ - ins_del_lines (j + unchanged_at_top, - p->deletecount); + ins_del_lines (frame, j + unchanged_at_top, - p->deletecount); } else { @@ -340,7 +342,7 @@ do_scrolling (current_matrix, matrix, window_size, unchanged_at_top) /* Set the terminal window if not yet done. */ if (!terminal_window_p) { - set_terminal_window (window_size + unchanged_at_top); + set_terminal_window (frame, window_size + unchanged_at_top); terminal_window_p = 1; } @@ -349,7 +351,7 @@ do_scrolling (current_matrix, matrix, window_size, unchanged_at_top) --queue; /* Do the deletion on the terminal. */ - ins_del_lines (queue->pos, queue->count); + ins_del_lines (frame, queue->pos, queue->count); /* All lines in the range deleted become empty in the glyph matrix. Assign to them glyph rows that are not retained. @@ -382,7 +384,7 @@ do_scrolling (current_matrix, matrix, window_size, unchanged_at_top) CHECK_MATRIX (current_matrix); if (terminal_window_p) - set_terminal_window (0); + set_terminal_window (frame, 0); } @@ -653,8 +655,9 @@ calculate_direct_scrolling (frame, matrix, window_size, lines_below, the cost matrix for this approach is constructed. */ static void -do_direct_scrolling (current_matrix, cost_matrix, window_size, - unchanged_at_top) +do_direct_scrolling (frame, current_matrix, cost_matrix, + window_size, unchanged_at_top) + struct frame *frame; struct glyph_matrix *current_matrix; struct matrix_elt *cost_matrix; int window_size; @@ -745,9 +748,9 @@ do_direct_scrolling (current_matrix, cost_matrix, window_size, if (i > j) { /* Immediately insert lines */ - set_terminal_window (i + unchanged_at_top); + set_terminal_window (frame, i + unchanged_at_top); terminal_window_p = 1; - ins_del_lines (j - n_to_write + unchanged_at_top, i - j); + ins_del_lines (frame, j - n_to_write + unchanged_at_top, i - j); } else if (i < j) { @@ -777,9 +780,9 @@ do_direct_scrolling (current_matrix, cost_matrix, window_size, --queue; if (queue->count) { - set_terminal_window (queue->window); + set_terminal_window (frame, queue->window); terminal_window_p = 1; - ins_del_lines (queue->pos, queue->count); + ins_del_lines (frame, queue->pos, queue->count); } else { @@ -802,7 +805,7 @@ do_direct_scrolling (current_matrix, cost_matrix, window_size, copy_from, retained_p); if (terminal_window_p) - set_terminal_window (0); + set_terminal_window (frame, 0); } @@ -828,7 +831,7 @@ scrolling_1 (frame, window_size, unchanged_at_top, unchanged_at_bottom, unchanged_at_bottom, draw_cost, old_draw_cost, old_hash, new_hash, free_at_end); - do_direct_scrolling (frame->current_matrix, + do_direct_scrolling (frame, frame->current_matrix, matrix, window_size, unchanged_at_top); } else @@ -836,7 +839,8 @@ scrolling_1 (frame, window_size, unchanged_at_top, unchanged_at_bottom, calculate_scrolling (frame, matrix, window_size, unchanged_at_bottom, draw_cost, old_hash, new_hash, free_at_end); - do_scrolling (frame->current_matrix, matrix, window_size, + do_scrolling (frame, + frame->current_matrix, matrix, window_size, unchanged_at_top); } }