diff options
Diffstat (limited to 'src/highlight.c')
-rw-r--r-- | src/highlight.c | 31 |
1 files changed, 17 insertions, 14 deletions
diff --git a/src/highlight.c b/src/highlight.c index efbc5b10e2..a8af2b18cf 100644 --- a/src/highlight.c +++ b/src/highlight.c @@ -460,6 +460,21 @@ init_highlight( #endif } +#if defined(FEAT_EVAL) && (defined(FEAT_GUI) || defined(FEAT_TERMGUICOLORS)) +/* + * Load a default color list. Intended to support legacy color names but allows + * the user to override the color values. Only loaded once. + */ + static void +load_default_colors_lists() +{ + // Lacking a default color list isn't the end of the world but it is likely + // an inconvenience so users should know when it is missing. + if (source_runtime((char_u *)"colors/lists/default.vim", DIP_ALL) != OK) + msg("failed to load colors/lists/default.vim"); +} +#endif + /* * Load color file "name". * Return OK for success, FAIL for failure. @@ -2272,7 +2287,7 @@ hex_digit(int c) return 0x1ffffff; } - guicolor_T + static guicolor_T decode_hex_color(char_u *hex) { guicolor_T color; @@ -2294,7 +2309,7 @@ decode_hex_color(char_u *hex) // such name exists in the color table. The convention is to use lowercase for // all keys in the v:colornames dictionary. The value can be either a string in // the form #rrggbb or a number, either of which is converted to a guicolor_T. - guicolor_T + static guicolor_T colorname2rgb(char_u *name) { dict_T *colornames_table = get_vim_var_dict(VV_COLORNAMES); @@ -2335,18 +2350,6 @@ colorname2rgb(char_u *name) return INVALCOLOR; } -/* - * Load a default color list. Intended to support legacy color names but allows - * the user to override the color values. Only loaded once. - */ - void -load_default_colors_lists() -{ - // Lacking a default color list isn't the end of the world but it is likely - // an inconvenience so users should know when it is missing. - if (source_runtime((char_u *)"colors/lists/default.vim", DIP_ALL) != OK) - msg("failed to load colors/lists/default.vim"); -} #endif guicolor_T |