aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGerd Moellmann1999-09-15 12:58:31 +0000
committerGerd Moellmann1999-09-15 12:58:31 +0000
commit26c636862d8be0ec45dc5b6b1391b6a31ffb4486 (patch)
tree1bf8d5825fa53453dea18283c9abfad6a1c44fcf /src
parent18d51459aa08c4eb80d90519c1f127965e413028 (diff)
downloademacs-26c636862d8be0ec45dc5b6b1391b6a31ffb4486.tar.gz
emacs-26c636862d8be0ec45dc5b6b1391b6a31ffb4486.zip
(update_frame_line): If writing whole desired line,
don't clear to end of line if already at the end.
Diffstat (limited to 'src')
-rw-r--r--src/dispnew.c30
1 files changed, 21 insertions, 9 deletions
diff --git a/src/dispnew.c b/src/dispnew.c
index 599019152c0..87ad3de2e07 100644
--- a/src/dispnew.c
+++ b/src/dispnew.c
@@ -4781,31 +4781,31 @@ update_frame_line (frame, vpos)
4781 else 4781 else
4782 reassert_line_highlight (desired_row->inverse_p, vpos); 4782 reassert_line_highlight (desired_row->inverse_p, vpos);
4783 4783
4784 /* Current row not enabled means it has unknown contents. We must
4785 write the whole desired line in that case. */
4784 must_write_whole_line_p = !current_row->enabled_p; 4786 must_write_whole_line_p = !current_row->enabled_p;
4785 if (must_write_whole_line_p) 4787 if (must_write_whole_line_p)
4786 { 4788 {
4787 /* A line that is not enabled is empty. */
4788 obody = 0; 4789 obody = 0;
4789 olen = 0; 4790 olen = 0;
4790 } 4791 }
4791 else 4792 else
4792 { 4793 {
4793 /* A line not empty in the current matrix. */
4794 obody = MATRIX_ROW_GLYPH_START (current_matrix, vpos); 4794 obody = MATRIX_ROW_GLYPH_START (current_matrix, vpos);
4795 olen = current_row->used[TEXT_AREA]; 4795 olen = current_row->used[TEXT_AREA];
4796 4796
4797 if (! current_row->inverse_p) 4797 if (! current_row->inverse_p)
4798 { 4798 {
4799 /* Ignore trailing spaces. */ 4799 /* Ignore trailing spaces, if we can. */
4800 if (!must_write_spaces) 4800 if (!must_write_spaces)
4801 while (olen > 0 && CHAR_GLYPH_SPACE_P (obody[olen-1])) 4801 while (olen > 0 && CHAR_GLYPH_SPACE_P (obody[olen-1]))
4802 olen--; 4802 olen--;
4803 } 4803 }
4804 else 4804 else
4805 { 4805 {
4806 /* For an inverse-video line, remember we gave it spaces all 4806 /* For an inverse-video line, make sure it's filled with
4807 the way to the frame edge so that the reverse video 4807 spaces all the way to the frame edge so that the reverse
4808 extends all the way across. */ 4808 video extends all the way across. */
4809 while (olen < FRAME_WIDTH (frame) - 1) 4809 while (olen < FRAME_WIDTH (frame) - 1)
4810 obody[olen++] = space_glyph; 4810 obody[olen++] = space_glyph;
4811 } 4811 }
@@ -4829,15 +4829,27 @@ update_frame_line (frame, vpos)
4829 /* If display line has unknown contents, write the whole line. */ 4829 /* If display line has unknown contents, write the whole line. */
4830 if (must_write_whole_line_p) 4830 if (must_write_whole_line_p)
4831 { 4831 {
4832 /* Ignore spaces at the end, if we can. */
4832 if (!must_write_spaces) 4833 if (!must_write_spaces)
4833 while (nlen > 0 && CHAR_GLYPH_SPACE_P (nbody[nlen - 1])) 4834 while (nlen > 0 && CHAR_GLYPH_SPACE_P (nbody[nlen - 1]))
4834 --nlen; 4835 --nlen;
4835 4836
4836 cursor_to (vpos, 0); 4837 /* Write the contents of the desired line. */
4837 if (nlen) 4838 if (nlen)
4838 write_glyphs (nbody, nlen); 4839 {
4840 cursor_to (vpos, 0);
4841 write_glyphs (nbody, nlen);
4842 }
4839 4843
4840 clear_end_of_line (FRAME_WINDOW_WIDTH (frame)); 4844 /* Don't call clear_end_of_line if we already wrote the whole
4845 line. The cursor will not be at the right margin in that
4846 case but in the line below. */
4847 if (nlen < FRAME_WINDOW_WIDTH (frame))
4848 {
4849 cursor_to (vpos, nlen);
4850 clear_end_of_line (FRAME_WINDOW_WIDTH (frame));
4851 }
4852
4841 make_current (desired_matrix, current_matrix, vpos); 4853 make_current (desired_matrix, current_matrix, vpos);
4842 return; 4854 return;
4843 } 4855 }