[PATCH] fix menuconfig colours with TERM=vt100
authorRoman Zippel <zippel@linux-m68k.org>
Sat, 25 Nov 2006 19:09:32 +0000 (11:09 -0800)
committerLinus Torvalds <torvalds@woody.osdl.org>
Sat, 25 Nov 2006 21:28:34 +0000 (13:28 -0800)
On Mon, 13 Nov 2006, Phil Oester wrote:
> In commit 350b5b76384e77bcc58217f00455fdbec5cac594, the default menuconfig
> color scheme was changed to bluetitle.  This breaks the highlighting
> of the selected item for me with TERM=vt100.  The only way I can see
> which item is selected is via:
>
>     make MENUCONFIG_COLOR=mono menuconfig
>
> Which restores the pre-2.6.19 white on black highlighting.

Fix.

Cc: Phil Oester <kernel@linuxace.com>
Signed-off-by: Roman Zippel <zippel@linux-m68k.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
scripts/kconfig/lxdialog/util.c

index ebc781b493d7c8a86ca7d95bae7f943bbb5430a9..d54440fc166cbd03bc8c16c9c91667fd9631761e 100644 (file)
@@ -221,16 +221,14 @@ static void init_dialog_colors(void)
  */
 static void color_setup(const char *theme)
 {
-       if (set_theme(theme)) {
-               if (has_colors()) {     /* Terminal supports color? */
-                       start_color();
-                       init_dialog_colors();
-               }
-       }
-       else
-       {
+       int use_color;
+
+       use_color = set_theme(theme);
+       if (use_color && has_colors()) {
+               start_color();
+               init_dialog_colors();
+       } else
                set_mono_theme();
-       }
 }
 
 /*