1 commit 6faa447282fe90d42e0513af46c13f20b4b327d4
2 Author: Yann E. MORIN <yann.morin.1998@free.fr>
3 Date: Wed Nov 13 22:45:02 2013 +0100
5 support/kconfig: fix 'space' to (de)select options
7 In case a menu has comment without letters/numbers (eg. characters
8 matching the regexp '^[^[:alpha:][:digit:]]+$', for example - or *),
9 hitting space will cycle through those comments, rather than
10 selecting/deselecting the currently-highlighted option.
12 This is the behaviour of hitting any letter/digit: jump to the next
13 option which prompt starts with that letter. The only letters that
14 do not behave as such are 'y' 'm' and 'n'. Prompts that start with
15 one of those three letters are instead matched on the first letter
16 that is not 'y', 'm' or 'n'.
18 Fix that by treating 'space' as we treat y/m/n, ie. as an action key,
19 not as shortcut to jump to prompt.
21 Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
22 Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
23 Cc: Peter Korsgaard <jacmet@uclibc.org>
24 Cc: Samuel Martin <s.martin49@gmail.com>
25 Cc: Thomas De Schampheleire <patrickdepinguin@gmail.com>
27 Note: I'll be running this upstream soonish.
29 diff --git a/support/kconfig/lxdialog/menubox.c b/support/kconfig/lxdialog/menubox.c
30 index 48d382e..6fc7e78 100644
31 --- a/lxdialog/menubox.c
32 +++ b/lxdialog/menubox.c
33 @@ -285,7 +285,7 @@ do_resize:
34 if (key < 256 && isalpha(key))
37 - if (strchr("ynmh", key))
38 + if (strchr("ynmh ", key))
41 for (i = choice + 1; i < max_choice; i++) {