changeset 36801:0d387c8ca7db

(highlight_trailing_whitespace): On character terminals, skip the padding blanks inserted in extend_face_to_end_of_line, before checking for trailing whitespace.
author Gerd Moellmann <gerd@gnu.org>
date Wed, 14 Mar 2001 13:26:13 +0000
parents 7a809e9fc67e
children 7225d251346b
files src/xdisp.c
diffstat 1 files changed, 7 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/src/xdisp.c	Wed Mar 14 13:18:05 2001 +0000
+++ b/src/xdisp.c	Wed Mar 14 13:26:13 2001 +0000
@@ -12252,11 +12252,13 @@
       struct glyph *start = row->glyphs[TEXT_AREA];
       struct glyph *glyph = start + used - 1;
 
-      /* Skip over the space glyph inserted to display the
-	 cursor at the end of a line.  */
-      if (glyph->type == CHAR_GLYPH
-	  && glyph->u.ch == ' '
-	  && INTEGERP (glyph->object))
+      /* Skip over space glyphs inserted to display the cursor at the
+	 end of a line, and for extending the face of the last glyph
+	 to the end of the line on terminals.  */
+      while (glyph >= start
+	     && glyph->type == CHAR_GLYPH
+	     && glyph->u.ch == ' '
+	     && INTEGERP (glyph->object))
 	--glyph;
 
       /* If last glyph is a space or stretch, and it's trailing