Browse Source

* edit.h [!HAVE_SLANG]: Enable syntax highlighting.
* editdraw.c [!HAVE_SLANG]: Respect attributes for color pairs
by using MY_COLOR_PAIR macro.

Pavel Roskin 22 years ago
parent
commit
75666df0fe
3 changed files with 7 additions and 5 deletions
  1. 4 0
      edit/ChangeLog
  2. 1 3
      edit/edit.h
  3. 2 2
      edit/editdraw.c

+ 4 - 0
edit/ChangeLog

@@ -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"

+ 1 - 3
edit/edit.h

@@ -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>

+ 2 - 2
edit/editdraw.c

@@ -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[])