aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGerd Moellmann2000-09-18 11:39:53 +0000
committerGerd Moellmann2000-09-18 11:39:53 +0000
commit504805ac2f2aeeb010a64a90581c8e0cc706545a (patch)
treef1ab8d39a28d2c76c5e73e46f61bb32e48efc785 /src
parentf4779de9e96f656ca4f9a94059f0bb2deafdf748 (diff)
downloademacs-504805ac2f2aeeb010a64a90581c8e0cc706545a.tar.gz
emacs-504805ac2f2aeeb010a64a90581c8e0cc706545a.zip
(update_window): Move test for invisible lines
at the top to update_window_line. (update_window_line): Handle invisible lines here.
Diffstat (limited to 'src')
-rw-r--r--src/dispnew.c95
1 files changed, 45 insertions, 50 deletions
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)
3844 int vpos = MATRIX_ROW_VPOS (row, desired_matrix); 3844 int vpos = MATRIX_ROW_VPOS (row, desired_matrix);
3845 int i; 3845 int i;
3846 3846
3847 /* A row can be completely invisible in case a desired
3848 matrix was built with a vscroll and then
3849 make_cursor_line_fully_visible shifts the matrix.
3850 Make sure to make such rows current anyway, since
3851 we need the correct y-position, for example, in the
3852 current matrix. */
3853 if (row->visible_height <= 0)
3854 {
3855 make_current (w->desired_matrix, w->current_matrix, vpos);
3856 continue;
3857 }
3858
3859 /* We'll Have to play a little bit with when to 3847 /* We'll Have to play a little bit with when to
3860 detect_input_pending. If it's done too often, 3848 detect_input_pending. If it's done too often,
3861 scrolling large windows with repeated scroll-up 3849 scrolling large windows with repeated scroll-up
@@ -4137,51 +4125,58 @@ update_window_line (w, vpos, mouse_face_overwritten_p)
4137 struct glyph_row *desired_row = MATRIX_ROW (w->desired_matrix, vpos); 4125 struct glyph_row *desired_row = MATRIX_ROW (w->desired_matrix, vpos);
4138 int changed_p = 0; 4126 int changed_p = 0;
4139 4127
4140 xassert (desired_row->enabled_p);
4141
4142 /* Set the row being updated. This is important to let xterm.c 4128 /* Set the row being updated. This is important to let xterm.c
4143 know what line height values are in effect. */ 4129 know what line height values are in effect. */
4144 updated_row = desired_row; 4130 updated_row = desired_row;
4145 4131
4146 /* Update display of the left margin area, if there is one. */ 4132 /* A row can be completely invisible in case a desired matrix was
4147 if (!desired_row->full_width_p 4133 built with a vscroll and then make_cursor_line_fully_visible shifts
4148 && !NILP (w->left_margin_width)) 4134 the matrix. Make sure to make such rows current anyway, since
4149 { 4135 we need the correct y-position, for example, in the current matrix. */
4150 changed_p = 1; 4136 if (desired_row->visible_height > 0)
4151 update_marginal_area (w, LEFT_MARGIN_AREA, vpos);
4152 }
4153
4154 /* Update the display of the text area. */
4155 if (update_text_area (w, vpos))
4156 { 4137 {
4157 changed_p = 1; 4138 xassert (desired_row->enabled_p);
4158 if (current_row->mouse_face_p) 4139
4159 *mouse_face_overwritten_p = 1; 4140 /* Update display of the left margin area, if there is one. */
4160 } 4141 if (!desired_row->full_width_p
4161 4142 && !NILP (w->left_margin_width))
4162 /* Update display of the right margin area, if there is one. */ 4143 {
4163 if (!desired_row->full_width_p 4144 changed_p = 1;
4164 && !NILP (w->right_margin_width)) 4145 update_marginal_area (w, LEFT_MARGIN_AREA, vpos);
4165 { 4146 }
4166 changed_p = 1; 4147
4167 update_marginal_area (w, RIGHT_MARGIN_AREA, vpos); 4148 /* Update the display of the text area. */
4149 if (update_text_area (w, vpos))
4150 {
4151 changed_p = 1;
4152 if (current_row->mouse_face_p)
4153 *mouse_face_overwritten_p = 1;
4154 }
4155
4156 /* Update display of the right margin area, if there is one. */
4157 if (!desired_row->full_width_p
4158 && !NILP (w->right_margin_width))
4159 {
4160 changed_p = 1;
4161 update_marginal_area (w, RIGHT_MARGIN_AREA, vpos);
4162 }
4163
4164 /* Draw truncation marks etc. */
4165 if (!current_row->enabled_p
4166 || desired_row->y != current_row->y
4167 || desired_row->visible_height != current_row->visible_height
4168 || desired_row->overlay_arrow_p != current_row->overlay_arrow_p
4169 || desired_row->truncated_on_left_p != current_row->truncated_on_left_p
4170 || desired_row->truncated_on_right_p != current_row->truncated_on_right_p
4171 || desired_row->continued_p != current_row->continued_p
4172 || desired_row->mode_line_p != current_row->mode_line_p
4173 || (desired_row->indicate_empty_line_p
4174 != current_row->indicate_empty_line_p)
4175 || (MATRIX_ROW_CONTINUATION_LINE_P (desired_row)
4176 != MATRIX_ROW_CONTINUATION_LINE_P (current_row)))
4177 rif->after_update_window_line_hook (desired_row);
4168 } 4178 }
4169 4179
4170 /* Draw truncation marks etc. */
4171 if (!current_row->enabled_p
4172 || desired_row->y != current_row->y
4173 || desired_row->visible_height != current_row->visible_height
4174 || desired_row->overlay_arrow_p != current_row->overlay_arrow_p
4175 || desired_row->truncated_on_left_p != current_row->truncated_on_left_p
4176 || desired_row->truncated_on_right_p != current_row->truncated_on_right_p
4177 || desired_row->continued_p != current_row->continued_p
4178 || desired_row->mode_line_p != current_row->mode_line_p
4179 || (desired_row->indicate_empty_line_p
4180 != current_row->indicate_empty_line_p)
4181 || (MATRIX_ROW_CONTINUATION_LINE_P (desired_row)
4182 != MATRIX_ROW_CONTINUATION_LINE_P (current_row)))
4183 rif->after_update_window_line_hook (desired_row);
4184
4185 /* Update current_row from desired_row. */ 4180 /* Update current_row from desired_row. */
4186 make_current (w->desired_matrix, w->current_matrix, vpos); 4181 make_current (w->desired_matrix, w->current_matrix, vpos);
4187 updated_row = NULL; 4182 updated_row = NULL;