* Subject: [PATCH] Allow menuconfig to hotkey cycle through choices
@ 2006-04-10 14:42 John Rigby
0 siblings, 0 replies; only message in thread
From: John Rigby @ 2006-04-10 14:42 UTC (permalink / raw)
To: Roman Zippel; +Cc: lkml, Sam Ravnborg
[-- Attachment #1: Type: text/plain, Size: 79 bytes --]
Same patch as before now with better description added as requested by Roman.
[-- Attachment #2: 0001-Allow-menuconfig-to-cycle-through-choices.txt --]
[-- Type: text/plain, Size: 1508 bytes --]
Subject: [PATCH] Allow menuconfig to hotkey cycle through choices
If you have multiple configs inside a choice with prompts that start with the
same character typing the first character takes you to the first one under
the old behavior. You have to use arrow or +/- keys to go to the other choices.
With the patch typing the first character will cycle between all the
prompts starting with that character.
This behavior has always been available in normal "menus" which are handled by
dialog_menu. This patch adds the same functionality to dialog_checklist.
Signed-off-by: John Rigby <jrigby@freescale.com>
---
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2006-04-10 14:42 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-04-10 14:42 Subject: [PATCH] Allow menuconfig to hotkey cycle through choices John Rigby
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®