Mercurial > emacs
comparison src/dispnew.c @ 31690:6abff42174ea
(update_window): Move test for invisible lines
at the top to update_window_line.
(update_window_line): Handle invisible lines here.
author | Gerd Moellmann <gerd@gnu.org> |
---|---|
date | Mon, 18 Sep 2000 11:39:53 +0000 |
parents | 2554afbeb88d |
children | 59b455472b56 |
comparison
equal
deleted
inserted
replaced
31689:0b116000e89f | 31690:6abff42174ea |
---|---|
3842 if (row->enabled_p) | 3842 if (row->enabled_p) |
3843 { | 3843 { |
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 |
3862 commands will too quickly pause redisplay. */ | 3850 commands will too quickly pause redisplay. */ |
3863 if (!force_p && vpos % preempt_count == 0) | 3851 if (!force_p && vpos % preempt_count == 0) |
4135 { | 4123 { |
4136 struct glyph_row *current_row = MATRIX_ROW (w->current_matrix, vpos); | 4124 struct glyph_row *current_row = MATRIX_ROW (w->current_matrix, vpos); |
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); | 4137 { |
4152 } | 4138 xassert (desired_row->enabled_p); |
4153 | 4139 |
4154 /* Update the display of the text area. */ | 4140 /* Update display of the left margin area, if there is one. */ |
4155 if (update_text_area (w, vpos)) | 4141 if (!desired_row->full_width_p |
4156 { | 4142 && !NILP (w->left_margin_width)) |
4157 changed_p = 1; | 4143 { |
4158 if (current_row->mouse_face_p) | 4144 changed_p = 1; |
4159 *mouse_face_overwritten_p = 1; | 4145 update_marginal_area (w, LEFT_MARGIN_AREA, vpos); |
4160 } | 4146 } |
4161 | 4147 |
4162 /* Update display of the right margin area, if there is one. */ | 4148 /* Update the display of the text area. */ |
4163 if (!desired_row->full_width_p | 4149 if (update_text_area (w, vpos)) |
4164 && !NILP (w->right_margin_width)) | 4150 { |
4165 { | 4151 changed_p = 1; |
4166 changed_p = 1; | 4152 if (current_row->mouse_face_p) |
4167 update_marginal_area (w, RIGHT_MARGIN_AREA, vpos); | 4153 *mouse_face_overwritten_p = 1; |
4168 } | 4154 } |
4169 | 4155 |
4170 /* Draw truncation marks etc. */ | 4156 /* Update display of the right margin area, if there is one. */ |
4171 if (!current_row->enabled_p | 4157 if (!desired_row->full_width_p |
4172 || desired_row->y != current_row->y | 4158 && !NILP (w->right_margin_width)) |
4173 || desired_row->visible_height != current_row->visible_height | 4159 { |
4174 || desired_row->overlay_arrow_p != current_row->overlay_arrow_p | 4160 changed_p = 1; |
4175 || desired_row->truncated_on_left_p != current_row->truncated_on_left_p | 4161 update_marginal_area (w, RIGHT_MARGIN_AREA, vpos); |
4176 || desired_row->truncated_on_right_p != current_row->truncated_on_right_p | 4162 } |
4177 || desired_row->continued_p != current_row->continued_p | 4163 |
4178 || desired_row->mode_line_p != current_row->mode_line_p | 4164 /* Draw truncation marks etc. */ |
4179 || (desired_row->indicate_empty_line_p | 4165 if (!current_row->enabled_p |
4180 != current_row->indicate_empty_line_p) | 4166 || desired_row->y != current_row->y |
4181 || (MATRIX_ROW_CONTINUATION_LINE_P (desired_row) | 4167 || desired_row->visible_height != current_row->visible_height |
4182 != MATRIX_ROW_CONTINUATION_LINE_P (current_row))) | 4168 || desired_row->overlay_arrow_p != current_row->overlay_arrow_p |
4183 rif->after_update_window_line_hook (desired_row); | 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); | |
4178 } | |
4184 | 4179 |
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; |
4188 return changed_p; | 4183 return changed_p; |