>From 48862b996ec576251fb39ccd37deddfa09a662ec Mon Sep 17 00:00:00 2001 From: Brand Huntsman Date: Fri, 2 Mar 2018 17:21:02 -0700 Subject: [PATCH 4/5] add bold attribute Default foreground color can be bolded with just "bold" color bold "regex" set titlecolor bold Signed-off-by: Brand Huntsman --- src/rcfile.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/rcfile.c b/src/rcfile.c index 7134feca..3bb300e4 100644 --- a/src/rcfile.c +++ b/src/rcfile.c @@ -766,6 +766,16 @@ bool parse_color_names(char *combostr, short *fg, short *bg, int *attributes) *attributes = A_NORMAL; + /* If the specified color starts with "bold,", set the bold attribute. + * The bold attribute makes named colors bold and bright, or only bright + * on terminals without bold support, or only bold for extended colors. */ + if (word != NULL && strcasecmp(word, "bold") == 0) { + *attributes |= A_BOLD; + + word = next_word; + next_word = find_next_comma_word(word); + } + /* If it's given and not empty, get the foreground color. */ if (word != NULL && *word != '\0') { *fg = color_to_short(word, &bright); -- 2.16.1