* syntax.c (edit_get_syntax_color): Return colorpair index, not

attribute, when syntax highlighting is disabled.  Handle black
and white mode separately.
This commit is contained in:
Pavel Roskin 2002-07-14 22:39:07 +00:00
parent 3c437c273d
commit 72a5fc5cc1
2 changed files with 6 additions and 2 deletions

View File

@ -1,5 +1,9 @@
2002-07-14 Pavel Roskin <proski@gnu.org>
* syntax.c (edit_get_syntax_color): Return colorpair index, not
attribute, when syntax highlighting is disabled. Handle black
and white mode separately.
* syntax.c (edit_load_syntax): Do nothing in black and white
mode.

View File

@ -371,7 +371,7 @@ void edit_get_syntax_color (WEdit * edit, long byte_index, int *color)
option_syntax_highlighting && use_colors) {
translate_rule_to_color (edit, edit_get_rule (edit, byte_index), color);
} else {
*color = EDITOR_NORMAL_COLOR;
*color = use_colors ? EDITOR_NORMAL_COLOR_INDEX : 0;
}
}
@ -1018,7 +1018,7 @@ void edit_free_syntax_rules (WEdit * edit)
void edit_get_syntax_color (WEdit * edit, long byte_index, int *color)
{
*color = EDITOR_NORMAL_COLOR;
*color = use_colors ? EDITOR_NORMAL_COLOR_INDEX : 0;
}
int edit_check_spelling (WEdit * edit)