diff --git a/edit/ChangeLog b/edit/ChangeLog index 880326cb0..553121f17 100644 --- a/edit/ChangeLog +++ b/edit/ChangeLog @@ -1,5 +1,8 @@ 2002-07-14 Pavel Roskin + * syntax.c (edit_load_syntax): Do nothing in black and white + mode. + * edit.h [!HAVE_SLANG]: Enable syntax highlighting. * editdraw.c [!HAVE_SLANG]: Respect attributes for color pairs by using MY_COLOR_PAIR macro. diff --git a/edit/syntax.c b/edit/syntax.c index 41ef95987..5924b59b3 100644 --- a/edit/syntax.c +++ b/edit/syntax.c @@ -365,8 +365,6 @@ static void translate_rule_to_color (WEdit * edit, struct syntax_rule rule, int *color = k->color; } -extern int use_colors; - void edit_get_syntax_color (WEdit * edit, long byte_index, int *color) { if (edit->rules && byte_index < edit->last_byte && @@ -975,6 +973,9 @@ void edit_load_syntax (WEdit * edit, char **names, char *type) edit_free_syntax_rules (edit); + if (!use_colors) + return; + if (!option_syntax_highlighting) return;