diff options
author | Gerd Moellmann <gerd@gnu.org> | 1999-08-17 22:44:37 +0000 |
---|---|---|
committer | Gerd Moellmann <gerd@gnu.org> | 1999-08-17 22:44:37 +0000 |
commit | 74ca462f6d15dec88e7bd06a50401847daae97cf (patch) | |
tree | a1fa39f941e7bb526ac0a4e1cc5d04d86cb2b8f6 /src/dispnew.c | |
parent | f8e5fb70fabb280f5694adc5accd6c3c2185808d (diff) | |
download | emacs-74ca462f6d15dec88e7bd06a50401847daae97cf.tar.gz emacs-74ca462f6d15dec88e7bd06a50401847daae97cf.tar.bz2 emacs-74ca462f6d15dec88e7bd06a50401847daae97cf.zip |
(update_frame_line): If writing whole line,
don't write trailing spaces unless we must.
Diffstat (limited to 'src/dispnew.c')
-rw-r--r-- | src/dispnew.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/src/dispnew.c b/src/dispnew.c index b2a2d97dd62..9906022b00e 100644 --- a/src/dispnew.c +++ b/src/dispnew.c @@ -4836,10 +4836,18 @@ update_frame_line (frame, vpos) /* If display line has unknown contents, write the whole line. */ if (must_write_whole_line_p) { - cursor_to (vpos, 0); - write_glyphs (nbody, nlen); + if (!must_write_spaces) + while (nlen > 0 && CHAR_GLYPH_SPACE_P (nbody[nlen - 1])) + --nlen; + + if (nlen) + { + cursor_to (vpos, 0); + write_glyphs (nbody, nlen); + } + cursor_to (vpos, nlen); - clear_end_of_line (-1); + clear_end_of_line (olen); make_current (desired_matrix, current_matrix, vpos); return; } |