* edit.h [!HAVE_SLANG]: Enable syntax highlighting.

* editdraw.c [!HAVE_SLANG]: Respect attributes for color pairs
by using MY_COLOR_PAIR macro.
This commit is contained in:
Pavel Roskin 2002-07-14 21:43:53 +00:00
parent b0dfc1b672
commit 75666df0fe
3 changed files with 7 additions and 5 deletions

View File

@ -1,5 +1,9 @@
2002-07-14 Pavel Roskin <proski@gnu.org>
* edit.h [!HAVE_SLANG]: Enable syntax highlighting.
* editdraw.c [!HAVE_SLANG]: Respect attributes for color pairs
by using MY_COLOR_PAIR macro.
* edit.h (struct key_word): Remove unused "bg" field, rename
"fg" to "color", since it keeps all color information.
* syntax.c (edit_get_syntax_color): Replace "fg" and "bg"

View File

@ -23,9 +23,7 @@
#ifndef __EDIT_H
#define __EDIT_H
#ifdef HAVE_SLANG
# define HAVE_SYNTAXH 1
#endif
#define HAVE_SYNTAXH 1
#include <stdio.h>
#include <stdarg.h>

View File

@ -182,11 +182,11 @@ void edit_scroll_screen_over_cursor (WEdit * edit)
#define edit_move(x,y) widget_move(edit, y, x);
/* Set colorpair without interpreting S-Lang "emulated attributes" */
/* Set colorpair by index, don't interpret S-Lang "emulated attributes" */
#ifdef HAVE_SLANG
#define lowlevel_set_color(x) SLsmg_set_color(x & 0x7F)
#else
#define lowlevel_set_color(x) attrset(x)
#define lowlevel_set_color(x) attrset(MY_COLOR_PAIR(color))
#endif
static void print_to_widget (WEdit * edit, long row, int start_col, float start_col_real, long end_col, unsigned int line[])