rcfile: allow specifying a bright background color (with prefix "light")
If the terminal is capable of more than eight colors, specifying indexes 8 to 15 works fine for getting a light background color.
Этот коммит содержится в:
родитель
4d10f583e4
Коммит
adf7f33ea8
@ -1031,12 +1031,14 @@ bool parse_combination(char *combostr, short *fg, short *bg, int *attributes)
|
||||
|
||||
if (comma != NULL) {
|
||||
*bg = color_to_short(comma + 1, &vivid, &thick);
|
||||
if (vivid) {
|
||||
if (vivid && thick) {
|
||||
jot_error(N_("A background color cannot be bright"));
|
||||
return FALSE;
|
||||
}
|
||||
if (*bg == BAD_COLOR)
|
||||
return FALSE;
|
||||
if (vivid && COLORS > 8)
|
||||
*bg += 8;
|
||||
*comma = '\0';
|
||||
} else
|
||||
*bg = USE_THE_DEFAULT;
|
||||
|
@ -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)?(,(white|black|red|blue|green|yellow|magenta|cyan|normal))?\>"
|
||||
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 magenta "^[[:space:]]*i?color\>" "\<(start|end)="
|
||||
|
||||
# Comments
|
||||
|
Загрузка…
Ссылка в новой задаче
Block a user