Skip to contentSkip to conversation

ncofig v7 minor fix

PATCH Michal Marek 1 participant 1 message Jan 13, 2010 1 message not in the archive Kbuild

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw
Quoted 5 lines · Nir Tzachar

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

Thanks, applied, but please CC [email protected] next time.

Michal

Quoted 29 lines
---
 scripts/kconfig/nconf.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
scripts/kconfig/nconf.c +3 -3
index 8c56150..cab6bb0 100644
@@ -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,