diff options
author | YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> | 2011-05-21 10:56:45 +0900 |
---|---|---|
committer | YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> | 2011-05-21 10:56:45 +0900 |
commit | 4d8ade89573bba54d21c2cff9886420770e0ef0b (patch) | |
tree | ede5b49b26c996c6594db52fcb92dbce2613454c /src/dispnew.c | |
parent | 165fd2df8cc5cfc292d8f2b81c7ff259bf7b9561 (diff) | |
download | emacs-4d8ade89573bba54d21c2cff9886420770e0ef0b.tar.gz |
* dispnew.c (scrolling_window): Don't exclude the case that the
last enabled row in the desired matrix touches the bottom boundary.
Diffstat (limited to 'src/dispnew.c')
-rw-r--r-- | src/dispnew.c | 30 |
1 files changed, 18 insertions, 12 deletions
diff --git a/src/dispnew.c b/src/dispnew.c index 60ce149da1c..5fd29e2d591 100644 --- a/src/dispnew.c +++ b/src/dispnew.c @@ -4990,23 +4990,29 @@ scrolling_window (w, header_line_p) first_old = first_new = i; - /* Set last_new to the index + 1 of the last enabled row in the - desired matrix. */ + /* Set last_new to the index + 1 of the row that reaches the + bottom boundary in the desired matrix. Give up if we find a + disabled row before we reach the bottom boundary. */ i = first_new + 1; - while (i < desired_matrix->nrows - 1 - && MATRIX_ROW (desired_matrix, i)->enabled_p - && MATRIX_ROW_BOTTOM_Y (MATRIX_ROW (desired_matrix, i)) <= yb) - ++i; + while (i < desired_matrix->nrows - 1) + { + int bottom; - if (!MATRIX_ROW (desired_matrix, i)->enabled_p) - return 0; + if (!MATRIX_ROW (desired_matrix, i)->enabled_p) + return 0; + bottom = MATRIX_ROW_BOTTOM_Y (MATRIX_ROW (desired_matrix, i)); + if (bottom <= yb) + ++i; + if (bottom >= yb) + break; + } last_new = i; - /* Set last_old to the index + 1 of the last enabled row in the - current matrix. We don't look at the enabled flag here because - we plan to reuse part of the display even if other parts are - disabled. */ + /* Set last_old to the index + 1 of the row that reaches the bottom + boundary in the current matrix. We don't look at the enabled + flag here because we plan to reuse part of the display even if + other parts are disabled. */ i = first_old + 1; while (i < current_matrix->nrows - 1) { |