File src/cmd_handlers.c changed (mode: 100644) (index b1395d1a9..43f5ac4d4) |
... |
... |
parse_file_highlight(const cmd_info_t *cmd_info, col_attr_t *color) |
3106 |
3106 |
{ |
{ |
3107 |
3107 |
if(try_parse_cterm_color(equal + 1, 0, color) != 0) |
if(try_parse_cterm_color(equal + 1, 0, color) != 0) |
3108 |
3108 |
{ |
{ |
3109 |
|
return CMDS_ERR_CUSTOM; |
|
|
3109 |
|
/* Color not supported by the current terminal is not a hard error. */ |
|
3110 |
|
return 1; |
3110 |
3111 |
} |
} |
3111 |
3112 |
} |
} |
3112 |
3113 |
else if(strcmp(arg_name, "ctermfg") == 0) |
else if(strcmp(arg_name, "ctermfg") == 0) |
3113 |
3114 |
{ |
{ |
3114 |
3115 |
if(try_parse_cterm_color(equal + 1, 1, color) != 0) |
if(try_parse_cterm_color(equal + 1, 1, color) != 0) |
3115 |
3116 |
{ |
{ |
3116 |
|
return CMDS_ERR_CUSTOM; |
|
|
3117 |
|
/* Color not supported by the current terminal is not a hard error. */ |
|
3118 |
|
return 1; |
3117 |
3119 |
} |
} |
3118 |
3120 |
} |
} |
3119 |
3121 |
else if(strcmp(arg_name, "guibg") == 0) |
else if(strcmp(arg_name, "guibg") == 0) |
|
... |
... |
parse_file_highlight(const cmd_info_t *cmd_info, col_attr_t *color) |
3121 |
3123 |
int value; |
int value; |
3122 |
3124 |
if(try_parse_gui_color(equal + 1, &value) != 0) |
if(try_parse_gui_color(equal + 1, &value) != 0) |
3123 |
3125 |
{ |
{ |
3124 |
|
return CMDS_ERR_CUSTOM; |
|
|
3126 |
|
/* Color not supported by the current terminal is not a hard error. */ |
|
3127 |
|
return 1; |
3125 |
3128 |
} |
} |
3126 |
3129 |
|
|
3127 |
3130 |
cs_color_enable_gui(color); |
cs_color_enable_gui(color); |
|
... |
... |
parse_file_highlight(const cmd_info_t *cmd_info, col_attr_t *color) |
3132 |
3135 |
int value; |
int value; |
3133 |
3136 |
if(try_parse_gui_color(equal + 1, &value) != 0) |
if(try_parse_gui_color(equal + 1, &value) != 0) |
3134 |
3137 |
{ |
{ |
3135 |
|
return CMDS_ERR_CUSTOM; |
|
|
3138 |
|
/* Color not supported by the current terminal is not a hard error. */ |
|
3139 |
|
return 1; |
3136 |
3140 |
} |
} |
3137 |
3141 |
|
|
3138 |
3142 |
cs_color_enable_gui(color); |
cs_color_enable_gui(color); |
|
... |
... |
try_parse_cterm_color(const char str[], int is_fg, col_attr_t *color) |
3192 |
3196 |
cs->state = CSS_BROKEN; |
cs->state = CSS_BROKEN; |
3193 |
3197 |
} |
} |
3194 |
3198 |
|
|
3195 |
|
return CMDS_ERR_CUSTOM; |
|
|
3199 |
|
return 1; |
3196 |
3200 |
} |
} |
3197 |
3201 |
|
|
3198 |
3202 |
if(is_fg) |
if(is_fg) |