comparison src/dispnew.c @ 25313:6b4475fbef86

(update_frame_line): If writing whole line, don't write trailing spaces unless we must.
author Gerd Moellmann <gerd@gnu.org>
date Tue, 17 Aug 1999 22:44:37 +0000
parents 4b75c26bd356
children 441b16431fdd
comparison
equal deleted inserted replaced
25312:4d817651d5b4 25313:6b4475fbef86
4834 nend = nbody + nlen; 4834 nend = nbody + nlen;
4835 4835
4836 /* If display line has unknown contents, write the whole line. */ 4836 /* If display line has unknown contents, write the whole line. */
4837 if (must_write_whole_line_p) 4837 if (must_write_whole_line_p)
4838 { 4838 {
4839 cursor_to (vpos, 0); 4839 if (!must_write_spaces)
4840 write_glyphs (nbody, nlen); 4840 while (nlen > 0 && CHAR_GLYPH_SPACE_P (nbody[nlen - 1]))
4841 --nlen;
4842
4843 if (nlen)
4844 {
4845 cursor_to (vpos, 0);
4846 write_glyphs (nbody, nlen);
4847 }
4848
4841 cursor_to (vpos, nlen); 4849 cursor_to (vpos, nlen);
4842 clear_end_of_line (-1); 4850 clear_end_of_line (olen);
4843 make_current (desired_matrix, current_matrix, vpos); 4851 make_current (desired_matrix, current_matrix, vpos);
4844 return; 4852 return;
4845 } 4853 }
4846 4854
4847 /* Pretend trailing spaces are not there at all, 4855 /* Pretend trailing spaces are not there at all,