]> granicus.if.org Git - mutt/commitdiff
Fix the "unknown color" bug reported by Vikas.
authorThomas Roessler <roessler@does-not-exist.org>
Tue, 16 Jun 1998 15:02:09 +0000 (15:02 +0000)
committerThomas Roessler <roessler@does-not-exist.org>
Tue, 16 Jun 1998 15:02:09 +0000 (15:02 +0000)
color.c

diff --git a/color.c b/color.c
index 6468b2e3614f9ad259a31b862fd3dc45f343c09d..66bcd8b315fe02214265bc2e6babab76a811f141 100644 (file)
--- a/color.c
+++ b/color.c
@@ -347,7 +347,8 @@ parse_color_name (const char *s, int *col, int *attr, int brite, BUFFER *err)
   {
     s += 5;
     *col = strtol (s, &eptr, 10);
-    if (!*s || *eptr || *col < 0 || *col >= COLORS)
+    if (!*s || *eptr || *col < 0 ||
+       (*col >= COLORS && !option(OPTNOCURSES) && has_colors()))
     {
       snprintf (err->data, err->dsize, "%s: color not supported by term", s);
       return (-1);