[PATCH] Allow menuconfig to cycle through choices

From: John Rigby
Date: Thu Apr 06 2006 - 14:25:19 EST


Added cycling logic to dialog_checklist identical to what
dialog_menu already has.

Signed-off-by: John Rigby <jrigby@xxxxxxxxxxxxx>

---

scripts/kconfig/lxdialog/checklist.c | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)

8c5500ea727987ea35a7ccaa463dcaf50eb731b2
diff --git a/scripts/kconfig/lxdialog/checklist.c b/scripts/kconfig/lxdialog/checklist.c
index db07ae7..af41cb1 100644
--- a/scripts/kconfig/lxdialog/checklist.c
+++ b/scripts/kconfig/lxdialog/checklist.c
@@ -203,10 +203,15 @@ int dialog_checklist(const char *title,
while (key != ESC) {
key = wgetch(dialog);

- for (i = 0; i < max_choice; i++)
+ for (i = choice + 1; i < max_choice; i++)
if (toupper(key) ==
toupper(items[(scroll + i) * 3 + 1][0]))
break;
+ if (i == max_choice)
+ for (i = 0; i < max_choice; i++)
+ if (toupper(key) ==
+ toupper(items[(scroll + i) * 3 + 1][0]))
+ break;

if (i < max_choice || key == KEY_UP || key == KEY_DOWN ||
key == '+' || key == '-') {
--
1.2.4





------=_Part_28581_26538231.1144357114180--
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/