]> git.eshelyaron.com Git - emacs.git/commitdiff
(x_set_mouse_face_gc): If first glyph isn't a character
authorGerd Moellmann <gerd@gnu.org>
Fri, 2 Jun 2000 19:03:31 +0000 (19:03 +0000)
committerGerd Moellmann <gerd@gnu.org>
Fri, 2 Jun 2000 19:03:31 +0000 (19:03 +0000)
glyph, use the ASCII NUL character to determine the face.

src/xterm.c

index 28280a4bd4609f053f4e4359e87fccce96ebf364..ba719f7689794c175b8297f6c318a43244e4a73a 100644 (file)
@@ -2611,7 +2611,10 @@ x_set_mouse_face_gc (s)
   /* What face has to be used for the mouse face?  */
   face_id = FRAME_X_DISPLAY_INFO (s->f)->mouse_face_face_id;
   face = FACE_FROM_ID (s->f, face_id);
-  face_id = FACE_FOR_CHAR (s->f, face, s->first_glyph->u.ch);
+  if (s->first_glyph->type == CHAR_GLYPH)
+    face_id = FACE_FOR_CHAR (s->f, face, s->first_glyph->u.ch);
+  else
+    face_id = FACE_FOR_CHAR (s->f, face, 0);
   s->face = FACE_FROM_ID (s->f, face_id);
   PREPARE_FACE_FOR_DISPLAY (s->f, s->face);