# HG changeset patch # User Gerd Moellmann # Date 936304556 0 # Node ID 28588533d3422f888910f29e7045322cffdf43a5 # Parent 863b49f711d6d458b8b80b7619844beaf3c89e6b (try_window_id): Reset first_unchanged_at_end_row if we have displayed to the bottom of the window. diff -r 863b49f711d6 -r 28588533d342 src/xdisp.c --- a/src/xdisp.c Thu Sep 02 20:35:55 1999 +0000 +++ b/src/xdisp.c Thu Sep 02 20:35:56 1999 +0000 @@ -9793,9 +9793,6 @@ start_pos = it.current.pos; } - bottom_row = MATRIX_BOTTOM_TEXT_ROW (current_matrix, w); - bottom_vpos = MATRIX_ROW_VPOS (bottom_row, current_matrix); - /* Find the first row that is not affected by changes at the end of the buffer. Value will be null if there is no unchanged row, in which case we must redisplay to the end of the window. delta @@ -9884,7 +9881,10 @@ /* Compute differences in buffer positions, y-positions etc. for lines reused at the bottom of the window. Compute what we can scroll. */ - if (first_unchanged_at_end_row) + if (first_unchanged_at_end_row + /* No lines reused because we displayed everything up to the + bottom of the window. */ + && it.current_y < it.last_visible_y) { dvpos = (it.vpos - MATRIX_ROW_VPOS (first_unchanged_at_end_row, @@ -9895,7 +9895,10 @@ run.height = it.last_visible_y - max (run.current_y, run.desired_y); } else - delta = dvpos = dy = run.current_y = run.desired_y = run.height = 0; + { + delta = dvpos = dy = run.current_y = run.desired_y = run.height = 0; + first_unchanged_at_end_row = NULL; + } IF_DEBUG (debug_dvpos = dvpos; debug_dy = dy); @@ -10043,7 +10046,11 @@ update_end (f); } - /* Shift reused rows of the current matrix to the right position. */ + /* Shift reused rows of the current matrix to the right position. + BOTTOM_ROW is the last + 1 row in the current matrix reserved for + text. */ + bottom_row = MATRIX_BOTTOM_TEXT_ROW (current_matrix, w); + bottom_vpos = MATRIX_ROW_VPOS (bottom_row, current_matrix); if (dvpos < 0) { rotate_matrix (current_matrix, first_unchanged_at_end_vpos + dvpos,