]> git.eshelyaron.com Git - emacs.git/commitdiff
(w32_face_attributes): Comment previous change.
authorJason Rumney <jasonr@gnu.org>
Sat, 1 Dec 2007 15:57:41 +0000 (15:57 +0000)
committerJason Rumney <jasonr@gnu.org>
Sat, 1 Dec 2007 15:57:41 +0000 (15:57 +0000)
src/w32console.c

index 2774a7c842a364bf359904916ccf44ed0d8181df..b1514f960b71e3f5309ea3e56daa30c401e08cd9 100644 (file)
@@ -517,12 +517,15 @@ w32_face_attributes (f, face_id)
   if (NILP (Vtty_defined_color_alist))
     return char_attr;
 
-  if (face->foreground >= 0
-      && face->foreground < 16)
+  /* Colors should be in the range 0...15 unless they are one of
+     FACE_TTY_DEFAULT_COLOR, FACE_TTY_DEFAULT_FG_COLOR or
+     FACE_TTY_DEFAULT_BG_COLOR.  Other out of range colors are
+     invalid, so it is better to use the default color if they ever
+     get through to here.  */
+  if (face->foreground >= 0 && face->foreground < 16)
     char_attr = (char_attr & 0xfff0) + face->foreground;
 
-  if (face->background >= 0
-      && face->background < 16)
+  if (face->background >= 0 && face->background < 16)
     char_attr = (char_attr & 0xff0f) + (face->background << 4);
 
   return char_attr;