diff --git a/src/rcfile.c b/src/rcfile.c index 1e27f164..7f5fb138 100644 --- a/src/rcfile.c +++ b/src/rcfile.c @@ -1029,6 +1029,16 @@ bool parse_combination(char *combostr, short *fg, short *bg, int *attributes) *attributes = A_NORMAL; + if (strncmp(combostr, "bold", 4) == 0) { + *attributes = A_BOLD; + if (combostr[4] != ',') { + jot_error(N_("An attribute requires a subsequent comma")); + return FALSE; + } + combostr += 5; + comma = strchr(combostr, ','); + } + if (comma != NULL) { *bg = color_to_short(comma + 1, &vivid, &thick); if (vivid && thick) { @@ -1050,7 +1060,7 @@ bool parse_combination(char *combostr, short *fg, short *bg, int *attributes) if (vivid && !thick && COLORS > 8) *fg += 8; else if (vivid) - *attributes = A_BOLD; + *attributes |= A_BOLD; } else *fg = USE_THE_DEFAULT; diff --git a/syntax/nanorc.nanorc b/syntax/nanorc.nanorc index fcc96a4b..ba132df3 100644 --- a/syntax/nanorc.nanorc +++ b/syntax/nanorc.nanorc @@ -21,7 +21,7 @@ color green "^[[:space:]]*((un)?(bind|set)|include|syntax|header|magic|comment|f color brightmagenta "([[:space:]]|(start|end)=)".+"([[:space:]]|$)" # Colors -color yellow "^[[:space:]]*i?color[[:space:]]*(bright|light)?(white|black|red|blue|green|yellow|magenta|cyan|normal)?(,(light)?(white|black|red|blue|green|yellow|magenta|cyan|normal))?\>" +color yellow "^[[:space:]]*i?color[[:space:]]*(bright|(bold,)?(light)?)?(white|black|red|blue|green|yellow|magenta|cyan|normal)?(,(light)?(white|black|red|blue|green|yellow|magenta|cyan|normal))?\>" color magenta "^[[:space:]]*i?color\>" "\<(start|end)=" # Comments