diff options
author | Thomas Roessler <roessler@does-not-exist.org> | 1998-06-16 15:02:09 +0000 |
---|---|---|
committer | Thomas Roessler <roessler@does-not-exist.org> | 1998-06-16 15:02:09 +0000 |
commit | fb0e96b4ceae3d34b2eb8163aa328950d2510db1 (patch) | |
tree | fee0c792adb343995c792f4fe57cb47a8aa1acd2 /color.c | |
parent | d1a559cc2326057d43f9aafa0bb81103cda32c4b (diff) |
Fix the "unknown color" bug reported by Vikas.
Diffstat (limited to 'color.c')
-rw-r--r-- | color.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -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); |