Mercurial > emacs
comparison src/dispnew.c @ 69110:9d86d35acf33
(update_text_area): Avoid needless redraw of rightmost
glyph whose face is extended to the text area end.
author | YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> |
---|---|
date | Thu, 23 Feb 2006 09:07:14 +0000 |
parents | 3bd95f4f2941 |
children | 761eaec1aae4 3cc2ba972850 34c8b755296d |
comparison
equal
deleted
inserted
replaced
69109:5f11fee2087b | 69110:9d86d35acf33 |
---|---|
4356 struct glyph *current_glyph = current_row->glyphs[TEXT_AREA]; | 4356 struct glyph *current_glyph = current_row->glyphs[TEXT_AREA]; |
4357 struct glyph *desired_glyph = desired_row->glyphs[TEXT_AREA]; | 4357 struct glyph *desired_glyph = desired_row->glyphs[TEXT_AREA]; |
4358 int overlapping_glyphs_p = current_row->contains_overlapping_glyphs_p; | 4358 int overlapping_glyphs_p = current_row->contains_overlapping_glyphs_p; |
4359 int desired_stop_pos = desired_row->used[TEXT_AREA]; | 4359 int desired_stop_pos = desired_row->used[TEXT_AREA]; |
4360 | 4360 |
4361 /* If the desired row extends its face to the text area end, | 4361 /* If the desired row extends its face to the text area end, and |
4362 unless the current row also does so at the same position, | |
4362 make sure we write at least one glyph, so that the face | 4363 make sure we write at least one glyph, so that the face |
4363 extension actually takes place. */ | 4364 extension actually takes place. */ |
4364 if (MATRIX_ROW_EXTENDS_FACE_P (desired_row)) | 4365 if (MATRIX_ROW_EXTENDS_FACE_P (desired_row) |
4366 && (desired_stop_pos < current_row->used[TEXT_AREA] | |
4367 || (desired_stop_pos == current_row->used[TEXT_AREA] | |
4368 && !MATRIX_ROW_EXTENDS_FACE_P (current_row)))) | |
4365 --desired_stop_pos; | 4369 --desired_stop_pos; |
4366 | 4370 |
4367 stop = min (current_row->used[TEXT_AREA], desired_stop_pos); | 4371 stop = min (current_row->used[TEXT_AREA], desired_stop_pos); |
4368 i = 0; | 4372 i = 0; |
4369 x = desired_row->x; | 4373 x = desired_row->x; |
4478 { | 4482 { |
4479 /* If new row extends to the end of the text area, nothing | 4483 /* If new row extends to the end of the text area, nothing |
4480 has to be cleared, if and only if we did a write_glyphs | 4484 has to be cleared, if and only if we did a write_glyphs |
4481 above. This is made sure by setting desired_stop_pos | 4485 above. This is made sure by setting desired_stop_pos |
4482 appropriately above. */ | 4486 appropriately above. */ |
4483 xassert (i < desired_row->used[TEXT_AREA]); | 4487 xassert (i < desired_row->used[TEXT_AREA] |
4488 || ((desired_row->used[TEXT_AREA] | |
4489 == current_row->used[TEXT_AREA]) | |
4490 && MATRIX_ROW_EXTENDS_FACE_P (current_row))); | |
4484 } | 4491 } |
4485 else if (MATRIX_ROW_EXTENDS_FACE_P (current_row)) | 4492 else if (MATRIX_ROW_EXTENDS_FACE_P (current_row)) |
4486 { | 4493 { |
4487 /* If old row extends to the end of the text area, clear. */ | 4494 /* If old row extends to the end of the text area, clear. */ |
4488 if (i >= desired_row->used[TEXT_AREA]) | 4495 if (i >= desired_row->used[TEXT_AREA]) |