From: YAMAMOTO Mitsuharu Date: Thu, 23 Feb 2006 09:07:23 +0000 (+0000) Subject: (update_text_area): Avoid needless redraw of rightmost X-Git-Tag: emacs-pretest-22.0.90~3935 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=7889775856af24b29d4613231e7d8be0217064c0;p=emacs.git (update_text_area): Avoid needless redraw of rightmost glyph whose face is extended to the text area end. --- diff --git a/src/ChangeLog b/src/ChangeLog index 2630efe73b7..df85b407911 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2006-02-23 YAMAMOTO Mitsuharu + + * dispnew.c (update_text_area): Avoid needless redraw of rightmost + glyph whose face is extended to the text area end. + 2006-02-22 Stefan Monnier * window.c (Fwindow_list): Check `window' before doing XWINDOW. diff --git a/src/dispnew.c b/src/dispnew.c index 52d5b989800..f6ce8eb43f4 100644 --- a/src/dispnew.c +++ b/src/dispnew.c @@ -4358,10 +4358,14 @@ update_text_area (w, vpos) int overlapping_glyphs_p = current_row->contains_overlapping_glyphs_p; int desired_stop_pos = desired_row->used[TEXT_AREA]; - /* If the desired row extends its face to the text area end, + /* If the desired row extends its face to the text area end, and + unless the current row also does so at the same position, make sure we write at least one glyph, so that the face extension actually takes place. */ - if (MATRIX_ROW_EXTENDS_FACE_P (desired_row)) + if (MATRIX_ROW_EXTENDS_FACE_P (desired_row) + && (desired_stop_pos < current_row->used[TEXT_AREA] + || (desired_stop_pos == current_row->used[TEXT_AREA] + && !MATRIX_ROW_EXTENDS_FACE_P (current_row)))) --desired_stop_pos; stop = min (current_row->used[TEXT_AREA], desired_stop_pos); @@ -4480,7 +4484,10 @@ update_text_area (w, vpos) has to be cleared, if and only if we did a write_glyphs above. This is made sure by setting desired_stop_pos appropriately above. */ - xassert (i < desired_row->used[TEXT_AREA]); + xassert (i < desired_row->used[TEXT_AREA] + || ((desired_row->used[TEXT_AREA] + == current_row->used[TEXT_AREA]) + && MATRIX_ROW_EXTENDS_FACE_P (current_row))); } else if (MATRIX_ROW_EXTENDS_FACE_P (current_row)) {