changeset 8119:20f7881bd015

(get_cached_face): Set the cached_index field.
author Richard M. Stallman <rms@gnu.org>
date Sat, 02 Jul 1994 04:23:45 +0000
parents 56b5ed321f8d
children 74f972cffd3a
files src/xfaces.c
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/xfaces.c	Sat Jul 02 04:09:37 1994 +0000
+++ b/src/xfaces.c	Sat Jul 02 04:23:45 1994 +0000
@@ -248,7 +248,10 @@
   for (i = 0; i < nfaces; i++)
     {
       if (face_eql (face_vector[i], face))
-	return face_vector[i];
+	{
+	  face->cached_index = i;
+	  return face_vector[i];
+	}
       if (face_vector[i] == 0)
 	empty = i;
     }
@@ -273,6 +276,7 @@
   /* Make a graphics context for it.  */
   build_face (f, result);
 
+  face->cached_index = empty;
   return result;
 }