emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master a8f99d1: Recreate macOS color list if it is corrupt


From: Alan Third
Subject: master a8f99d1: Recreate macOS color list if it is corrupt
Date: Sat, 1 Aug 2020 14:47:07 -0400 (EDT)

branch: master
commit a8f99d113c0556fd2860304ac7d7ff1c8f7c3ad4
Author: Alan Third <alan@idiocy.org>
Commit: Alan Third <alan@idiocy.org>

    Recreate macOS color list if it is corrupt
    
    * src/nsterm.m (ns_term_init): Generate the color list if there are
    less colors in the existing file than in rgb.txt.
---
 src/nsterm.m | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/nsterm.m b/src/nsterm.m
index 0e405fc..df7f716 100644
--- a/src/nsterm.m
+++ b/src/nsterm.m
@@ -5476,7 +5476,8 @@ ns_term_init (Lisp_Object display_name)
   {
     NSColorList *cl = [NSColorList colorListNamed: @"Emacs"];
 
-    if ( cl == nil )
+    /* There are 752 colors defined in rgb.txt.  */
+    if ( cl == nil || [[cl allKeys] count] < 752)
       {
         Lisp_Object color_file, color_map, color;
         unsigned long c;



reply via email to

[Prev in Thread] Current Thread [Next in Thread]