commit e0442849988444065145449c90861172c6aba302
parent 4f9d55bb153a9e25578aab3cbf0a7d3e692fc79c
Author: Benno Schulenberg <bensberg@telfort.nl>
Date: Tue, 25 May 2021 15:34:54 +0200
rcfile: do not allow color name "normal" to have a prefix
Because "lightnormal" sounds strange, and can have unexpected effects.
This fixes https://savannah.gnu.org/bugs/?60668.
Bug existed since version 2.9.5, since the name "normal" was introduced.
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/rcfile.c b/src/rcfile.c
@@ -1025,7 +1025,7 @@ short color_to_short(const char *colorname, bool *vivid, bool *thick)
for (int index = 0; index < COLORCOUNT; index++)
if (strcmp(colorname, hues[index]) == 0) {
- if (index > 8 && *vivid) {
+ if (index > 7 && *vivid) {
jot_error(N_("Color '%s' takes no prefix"), colorname);
return BAD_COLOR;
} else if (index > 8 && COLORS < 255)