From: Gerd Moellmann Date: Mon, 18 Sep 2000 11:39:53 +0000 (+0000) Subject: (update_window): Move test for invisible lines X-Git-Tag: emacs-pretest-21.0.90~1546 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=504805ac2f2aeeb010a64a90581c8e0cc706545a;p=emacs.git (update_window): Move test for invisible lines at the top to update_window_line. (update_window_line): Handle invisible lines here. --- diff --git a/src/dispnew.c b/src/dispnew.c index 61cf1754e2e..40309231c14 100644 --- a/src/dispnew.c +++ b/src/dispnew.c @@ -3844,18 +3844,6 @@ update_window (w, force_p) int vpos = MATRIX_ROW_VPOS (row, desired_matrix); int i; - /* A row can be completely invisible in case a desired - matrix was built with a vscroll and then - make_cursor_line_fully_visible shifts the matrix. - Make sure to make such rows current anyway, since - we need the correct y-position, for example, in the - current matrix. */ - if (row->visible_height <= 0) - { - make_current (w->desired_matrix, w->current_matrix, vpos); - continue; - } - /* We'll Have to play a little bit with when to detect_input_pending. If it's done too often, scrolling large windows with repeated scroll-up @@ -4137,51 +4125,58 @@ update_window_line (w, vpos, mouse_face_overwritten_p) struct glyph_row *desired_row = MATRIX_ROW (w->desired_matrix, vpos); int changed_p = 0; - xassert (desired_row->enabled_p); - /* Set the row being updated. This is important to let xterm.c know what line height values are in effect. */ updated_row = desired_row; - /* Update display of the left margin area, if there is one. */ - if (!desired_row->full_width_p - && !NILP (w->left_margin_width)) - { - changed_p = 1; - update_marginal_area (w, LEFT_MARGIN_AREA, vpos); - } - - /* Update the display of the text area. */ - if (update_text_area (w, vpos)) + /* A row can be completely invisible in case a desired matrix was + built with a vscroll and then make_cursor_line_fully_visible shifts + the matrix. Make sure to make such rows current anyway, since + we need the correct y-position, for example, in the current matrix. */ + if (desired_row->visible_height > 0) { - changed_p = 1; - if (current_row->mouse_face_p) - *mouse_face_overwritten_p = 1; - } - - /* Update display of the right margin area, if there is one. */ - if (!desired_row->full_width_p - && !NILP (w->right_margin_width)) - { - changed_p = 1; - update_marginal_area (w, RIGHT_MARGIN_AREA, vpos); + xassert (desired_row->enabled_p); + + /* Update display of the left margin area, if there is one. */ + if (!desired_row->full_width_p + && !NILP (w->left_margin_width)) + { + changed_p = 1; + update_marginal_area (w, LEFT_MARGIN_AREA, vpos); + } + + /* Update the display of the text area. */ + if (update_text_area (w, vpos)) + { + changed_p = 1; + if (current_row->mouse_face_p) + *mouse_face_overwritten_p = 1; + } + + /* Update display of the right margin area, if there is one. */ + if (!desired_row->full_width_p + && !NILP (w->right_margin_width)) + { + changed_p = 1; + update_marginal_area (w, RIGHT_MARGIN_AREA, vpos); + } + + /* Draw truncation marks etc. */ + if (!current_row->enabled_p + || desired_row->y != current_row->y + || desired_row->visible_height != current_row->visible_height + || desired_row->overlay_arrow_p != current_row->overlay_arrow_p + || desired_row->truncated_on_left_p != current_row->truncated_on_left_p + || desired_row->truncated_on_right_p != current_row->truncated_on_right_p + || desired_row->continued_p != current_row->continued_p + || desired_row->mode_line_p != current_row->mode_line_p + || (desired_row->indicate_empty_line_p + != current_row->indicate_empty_line_p) + || (MATRIX_ROW_CONTINUATION_LINE_P (desired_row) + != MATRIX_ROW_CONTINUATION_LINE_P (current_row))) + rif->after_update_window_line_hook (desired_row); } - /* Draw truncation marks etc. */ - if (!current_row->enabled_p - || desired_row->y != current_row->y - || desired_row->visible_height != current_row->visible_height - || desired_row->overlay_arrow_p != current_row->overlay_arrow_p - || desired_row->truncated_on_left_p != current_row->truncated_on_left_p - || desired_row->truncated_on_right_p != current_row->truncated_on_right_p - || desired_row->continued_p != current_row->continued_p - || desired_row->mode_line_p != current_row->mode_line_p - || (desired_row->indicate_empty_line_p - != current_row->indicate_empty_line_p) - || (MATRIX_ROW_CONTINUATION_LINE_P (desired_row) - != MATRIX_ROW_CONTINUATION_LINE_P (current_row))) - rif->after_update_window_line_hook (desired_row); - /* Update current_row from desired_row. */ make_current (w->desired_matrix, w->current_matrix, vpos); updated_row = NULL;