]> git.karo-electronics.de Git - linux-beck.git/commitdiff
nconfig: minor fix
authorNir Tzachar <nir.tzachar@gmail.com>
Wed, 13 Jan 2010 05:32:35 +0000 (07:32 +0200)
committerMichal Marek <mmarek@suse.cz>
Tue, 2 Feb 2010 13:33:55 +0000 (14:33 +0100)
This patch fixes two problems reported by Jan Engelhardt:
1) Border is now properly placed, to always be visible
2) Long menu items are properly displayed

Reported-by: Jan Engelhardt <jengelh@medozas.de>
Signed-off-by: Nir Tzachar <nir.tzachar@gmail.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
scripts/kconfig/nconf.c

index fb54c98874bc9985eb15e6f7b55e70b5cc75aa91..762caf80ce37d3822d43bf0a151ffcf8b8a17d21 100644 (file)
@@ -984,7 +984,7 @@ static void build_conf(struct menu *menu)
                                break;
                        default:
                                tmp = 2 + strlen(sym_get_string_value(sym));
-                               item_make(menu, 's', "(%s)",
+                               item_make(menu, 's', "    (%s)",
                                                sym_get_string_value(sym));
                                tmp = indent - tmp + 4;
                                if (tmp < 0)
@@ -1072,8 +1072,8 @@ static void show_menu(const char *prompt, const char *instructions,
 
        /* position the menu at the middle of the screen */
        scale_menu(curses_menu, &maxy, &maxx);
-       maxx = min(maxx, mwin_max_cols);
-       maxy = mwin_max_lines-1;
+       maxx = min(maxx, mwin_max_cols-2);
+       maxy = mwin_max_lines-2;
        menu_window = derwin(main_window,
                        maxy,
                        maxx,