nano-devel
[Top][All Lists]
Advanced

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

[PATCH] rcfile: allow using "grey" or "gray" as a synonym for "lightblac


From: Benno Schulenberg
Subject: [PATCH] rcfile: allow using "grey" or "gray" as a synonym for "lightblack"
Date: Tue, 25 May 2021 16:02:04 +0200

Because "lightblack" sounds strange and will not occur to many people
as a possible color name.
---
 src/rcfile.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/src/rcfile.c b/src/rcfile.c
index 12ed909e..3218ba1d 100644
--- a/src/rcfile.c
+++ b/src/rcfile.c
@@ -991,19 +991,21 @@ void parse_includes(char *ptr)
        free(expanded);
 }
 
-#define COLORCOUNT  18
+#define COLORCOUNT  20
 
 const char hues[COLORCOUNT][8] = { "red", "green", "blue",
                                                                   "yellow", 
"cyan", "magenta",
                                                                   "white", 
"black", "normal",
                                                                   "pink", 
"purple", "mauve",
                                                                   "lagoon", 
"mint", "lime",
-                                                                  "peach", 
"orange", "latte" };
+                                                                  "peach", 
"orange", "latte",
+                                                                  "grey", 
"gray" };
 
 short indices[COLORCOUNT] = { COLOR_RED, COLOR_GREEN, COLOR_BLUE,
                                                          COLOR_YELLOW, 
COLOR_CYAN, COLOR_MAGENTA,
                                                          COLOR_WHITE, 
COLOR_BLACK, THE_DEFAULT,
-                                                         204, 163, 134, 38, 
48, 148, 215, 208, 137 };
+                                                         204, 163, 134, 38, 
48, 148, 215, 208, 137,
+                                                         COLOR_BLACK + 8, 
COLOR_BLACK + 8 };
 
 /* Return the short value corresponding to the given color name, and set
  * vivid to TRUE for a lighter color, and thick for a heavier typeface. */
-- 
2.29.3




reply via email to

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