Commit 1768a3ac authored by Alexey Dobriyan's avatar Alexey Dobriyan Committed by Linus Torvalds

[PATCH] Fix menuconfig partial inability to show help texts.

Fix menuconfig inability to show help texts when there is menu item with
letter "H" highlighted on the screen.
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 5d87f5bd
...@@ -71,7 +71,7 @@ print_item (WINDOW * win, const char *item, int choice, int selected, int hotkey ...@@ -71,7 +71,7 @@ print_item (WINDOW * win, const char *item, int choice, int selected, int hotkey
strncpy(menu_item, item, menu_width); strncpy(menu_item, item, menu_width);
menu_item[menu_width] = 0; menu_item[menu_width] = 0;
j = first_alpha(menu_item, "YyNnMm"); j = first_alpha(menu_item, "YyNnMmHh");
/* Clear 'residue' of last item */ /* Clear 'residue' of last item */
wattrset (win, menubox_attr); wattrset (win, menubox_attr);
...@@ -279,17 +279,17 @@ dialog_menu (const char *title, const char *prompt, int height, int width, ...@@ -279,17 +279,17 @@ dialog_menu (const char *title, const char *prompt, int height, int width,
if (key < 256 && isalpha(key)) key = tolower(key); if (key < 256 && isalpha(key)) key = tolower(key);
if (strchr("ynm", key)) if (strchr("ynmh", key))
i = max_choice; i = max_choice;
else { else {
for (i = choice+1; i < max_choice; i++) { for (i = choice+1; i < max_choice; i++) {
j = first_alpha(items[(scroll+i)*2+1], "YyNnMm"); j = first_alpha(items[(scroll+i)*2+1], "YyNnMmHh");
if (key == tolower(items[(scroll+i)*2+1][j])) if (key == tolower(items[(scroll+i)*2+1][j]))
break; break;
} }
if (i == max_choice) if (i == max_choice)
for (i = 0; i < max_choice; i++) { for (i = 0; i < max_choice; i++) {
j = first_alpha(items[(scroll+i)*2+1], "YyNnMm"); j = first_alpha(items[(scroll+i)*2+1], "YyNnMmHh");
if (key == tolower(items[(scroll+i)*2+1][j])) if (key == tolower(items[(scroll+i)*2+1][j]))
break; break;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment