mirror of
https://github.com/MidnightCommander/mc
synced 2025-01-18 17:29:28 +03:00
* syntax.c (edit_load_syntax): Do nothing in black and white
mode.
This commit is contained in:
parent
82e481b78d
commit
3c437c273d
@ -1,5 +1,8 @@
|
|||||||
2002-07-14 Pavel Roskin <proski@gnu.org>
|
2002-07-14 Pavel Roskin <proski@gnu.org>
|
||||||
|
|
||||||
|
* syntax.c (edit_load_syntax): Do nothing in black and white
|
||||||
|
mode.
|
||||||
|
|
||||||
* edit.h [!HAVE_SLANG]: Enable syntax highlighting.
|
* edit.h [!HAVE_SLANG]: Enable syntax highlighting.
|
||||||
* editdraw.c [!HAVE_SLANG]: Respect attributes for color pairs
|
* editdraw.c [!HAVE_SLANG]: Respect attributes for color pairs
|
||||||
by using MY_COLOR_PAIR macro.
|
by using MY_COLOR_PAIR macro.
|
||||||
|
@ -365,8 +365,6 @@ static void translate_rule_to_color (WEdit * edit, struct syntax_rule rule, int
|
|||||||
*color = k->color;
|
*color = k->color;
|
||||||
}
|
}
|
||||||
|
|
||||||
extern int use_colors;
|
|
||||||
|
|
||||||
void edit_get_syntax_color (WEdit * edit, long byte_index, int *color)
|
void edit_get_syntax_color (WEdit * edit, long byte_index, int *color)
|
||||||
{
|
{
|
||||||
if (edit->rules && byte_index < edit->last_byte &&
|
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);
|
edit_free_syntax_rules (edit);
|
||||||
|
|
||||||
|
if (!use_colors)
|
||||||
|
return;
|
||||||
|
|
||||||
if (!option_syntax_highlighting)
|
if (!option_syntax_highlighting)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user