changeset 38994:5808b023eedb

(x_set_glyph_string_background_width): Set the glyph strings background width so that multi-line mouse-face is drawn to the right edge of the window. (show_mouse_face): Set the row's mouse_face_p flag after drawing glyphs.
author Gerd Moellmann <gerd@gnu.org>
date Tue, 28 Aug 2001 14:33:51 +0000
parents f15c86018e50
children e3ab893551db
files src/xterm.c
diffstat 1 files changed, 8 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/src/xterm.c	Tue Aug 28 13:23:34 2001 +0000
+++ b/src/xterm.c	Tue Aug 28 14:33:51 2001 +0000
@@ -4836,12 +4836,14 @@
   struct face *default_face = FACE_FROM_ID (s->f, DEFAULT_FACE_ID);
   
   if (start == s->row->used[s->area]
-      && s->hl == DRAW_NORMAL_TEXT
       && s->area == TEXT_AREA
-      && (s->row->fill_line_p
-	  || s->face->background != default_face->background
-	  || s->face->stipple != default_face->stipple))
-    s->extends_to_end_of_line_p = 1;
+      && ((s->hl == DRAW_NORMAL_TEXT
+	   && (s->row->fill_line_p
+	       || s->face->background != default_face->background
+	       || s->face->stipple != default_face->stipple
+	       || s->row->mouse_face_p))
+	  || s->hl == DRAW_MOUSE_FACE))
+      s->extends_to_end_of_line_p = 1;
   
   /* If S extends its face to the end of the line, set its
      background_width to the distance to the right edge of the drawing
@@ -7696,9 +7698,9 @@
 
       if (end_hpos > start_hpos)
 	{
-	  row->mouse_face_p = draw == DRAW_MOUSE_FACE || DRAW_IMAGE_RAISED;
 	  x_draw_glyphs (w, start_x, row, TEXT_AREA, 
 			 start_hpos, end_hpos, draw, NULL, NULL, 0);
+	  row->mouse_face_p = draw == DRAW_MOUSE_FACE || DRAW_IMAGE_RAISED;
 	}
     }