From da60fbbcb637b37b1d77a41886ae4e275422ca96 Mon Sep 17 00:00:00 2001 From: "Vadim Bendebury (вб)" Date: Sun, 20 Dec 2009 00:29:49 -0800 Subject: menuconfig: wrap long help lines Help text for certain config options is very extensive (the text includes the names of all other options the option in question depends on). Long lines are not wrapped, making it impossible to see the list without scrolling horizontally. This patch adds some logic which wraps help screen lines at word boundaries to prevent truncating. Tested by running ARCH=powerpc make menuconfig O=/tmp/build which shows that the long lines are now wrapped, and ARCH=powerpc make xconfig O=/tmp/build to demonstrate that it still compiles and operates as expected. Signed-off-by: Vadim Bendebury Signed-off-by: Michal Marek --- scripts/kconfig/mconf.c | 1 + 1 file changed, 1 insertion(+) (limited to 'scripts/kconfig/mconf.c') diff --git a/scripts/kconfig/mconf.c b/scripts/kconfig/mconf.c index 8413cf38ed27..ac1e9dacde97 100644 --- a/scripts/kconfig/mconf.c +++ b/scripts/kconfig/mconf.c @@ -638,6 +638,7 @@ static void show_help(struct menu *menu) { struct gstr help = str_new(); + help.max_width = getmaxx(stdscr) - 10; menu_get_ext_help(menu, &help); show_helptext(_(menu_get_prompt(menu)), str_get(&help)); -- cgit v1.2.3-59-g8ed1b