int centering_position = -1;
int last_line_misfit = 0;
EMACS_INT beg_unchanged, end_unchanged;
- int scrolling_up;
SET_TEXT_POS (lpoint, PT, PT_BYTE);
opoint = lpoint;
: 0;
EMACS_INT margin_pos = CHARPOS (startp);
Lisp_Object aggressive;
+ int scrolling_up;
/* If there is a scroll margin at the top of the window, find
its character position. */
scroll_margin > 0
? min (scroll_margin, WINDOW_TOTAL_LINES (w) / 4)
: 0;
+ int move_down = w->cursor.vpos >= WINDOW_TOTAL_LINES (w) / 2;
- move_it_by_lines (&it, scrolling_up ? margin + 1 : margin -1);
+ move_it_by_lines (&it, move_down ? margin + 1 : -(margin + 1));
clear_glyph_matrix (w->desired_matrix);
if (1 == try_window (window, it.current.pos,
TRY_WINDOW_CHECK_MARGINS))