From c04bae20d28e2a15fff43974aa0804f425c65db2 Mon Sep 17 00:00:00 2001 From: Francois Fleuret Date: Fri, 1 May 2009 15:58:24 +0200 Subject: [PATCH] Cosmetics. --- selector.cc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/selector.cc b/selector.cc index ebe528e..a1b5b11 100644 --- a/selector.cc +++ b/selector.cc @@ -827,8 +827,11 @@ int main(int argc, char **argv) { keypad(stdscr, TRUE); if(with_colors) { + if(has_colors()) { + start_color(); + if(color_fg_modeline < 0 || color_fg_modeline >= COLORS || color_bg_modeline < 0 || color_bg_modeline >= COLORS || color_fg_highlight < 0 || color_bg_highlight >= COLORS || @@ -838,8 +841,10 @@ int main(int argc, char **argv) { cerr << "Color numbers have to be between 0 and " << COLORS - 1 << "." << endl; exit(1); } - init_pair(COLOR_MODELINE , color_fg_modeline, color_bg_modeline); + + init_pair(COLOR_MODELINE, color_fg_modeline, color_bg_modeline); init_pair(COLOR_HIGHLIGHTED_LINE, color_fg_highlight, color_bg_highlight); + } else { with_colors = 0; } -- 2.39.5