diff --git a/src/color.c b/src/color.c index ab56a140..f187b472 100644 --- a/src/color.c +++ b/src/color.c @@ -61,9 +61,8 @@ void set_syntax_colorpairs(syntaxtype *sntx) } } -/* Initialize the colors for nano's interface, and assign pair numbers - * for the colors in each loaded syntax. */ -void set_colorpairs(void) +/* Initialize the color pairs for nano's interface. */ +void set_interface_colorpairs(void) { bool using_defaults = FALSE; @@ -102,11 +101,6 @@ void set_colorpairs(void) free(color_combo[index]); } - - /* For each loaded syntax, assign pair numbers to color combinations. */ - for (syntaxtype *sntx = syntaxes; sntx != NULL; sntx = sntx->next) - if (sntx->filename == NULL) - set_syntax_colorpairs(sntx); } /* Initialize the color pairs for the current syntax. */ diff --git a/src/nano.c b/src/nano.c index ada0be26..018db9c0 100644 --- a/src/nano.c +++ b/src/nano.c @@ -2254,7 +2254,7 @@ int main(int argc, char **argv) started_curses = TRUE; #ifdef ENABLE_COLOR - set_colorpairs(); + set_interface_colorpairs(); #else interface_color_pair[TITLE_BAR] = hilite_attribute; interface_color_pair[LINE_NUMBER] = hilite_attribute; diff --git a/src/proto.h b/src/proto.h index 099ade38..f398bfe4 100644 --- a/src/proto.h +++ b/src/proto.h @@ -242,7 +242,7 @@ bool is_valid_unicode(wchar_t wc); /* Most functions in color.c. */ #ifdef ENABLE_COLOR -void set_colorpairs(void); +void set_interface_colorpairs(void); void prepare_palette(void); void find_and_prime_applicable_syntax(void); void set_up_multicache(linestruct *line);