From 72a5fc5cc136024e889d91fcf197c4917f1cb857 Mon Sep 17 00:00:00 2001 From: Pavel Roskin Date: Sun, 14 Jul 2002 22:39:07 +0000 Subject: [PATCH] * syntax.c (edit_get_syntax_color): Return colorpair index, not attribute, when syntax highlighting is disabled. Handle black and white mode separately. --- edit/ChangeLog | 4 ++++ edit/syntax.c | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/edit/ChangeLog b/edit/ChangeLog index 553121f17..6b4c6a9c0 100644 --- a/edit/ChangeLog +++ b/edit/ChangeLog @@ -1,5 +1,9 @@ 2002-07-14 Pavel Roskin + * 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. diff --git a/edit/syntax.c b/edit/syntax.c index 5924b59b3..8e9921c84 100644 --- a/edit/syntax.c +++ b/edit/syntax.c @@ -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)