support/kconfig: fix 'space' to (de)select options
PATCH 1/1 support/kconfig: fix 'space' to (de)select options
From: "Yann E. MORIN" <[email protected]>
In case a menu has comment without letters/numbers (eg. characters matching the regexp '^[^[:alpha:][:digit:]]+$', for example - or *), hitting space will cycle through those comments, rather than selecting/deselecting the currently-highlighted option.
This is the behaviour of hitting any letter/digit: jump to the next option which prompt starts with that letter. The only letters that do not behave as such are 'y' 'm' and 'n'. Prompts that start with one of those three letters are instead matched on the first letter that is not 'y', 'm' or 'n'.
Fix that by treating 'space' as we treat y/m/n, ie. as an action key, not as shortcut to jump to prompt.
---
Note: I'll be running this upstream soonish.
--- support/kconfig/lxdialog/menubox.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
support/kconfig/lxdialog/menubox.c +1 -1
@@ -285,7 +285,7 @@ do_resize:if (key <256 &&isalpha (key)) key =tolower (key); -if (strchr ("ynmh" , key)) +if (strchr ("ynmh " , key)) i = max_choice;else {for (i = choice +1 ; i < max_choice; i++) {
Signature · 1 line
1.8.1.2
PATCH 1/1 support/kconfig: fix 'space' to (de)select options
Dear Yann E. MORIN,
Quoted 16 lines · Yann E. MORIN
From: "Yann E. MORIN" <[email protected]>
In case a menu has comment without letters/numbers (eg. characters matching the regexp '^[^[:alpha:][:digit:]]+$', for example - or *), hitting space will cycle through those comments, rather than selecting/deselecting the currently-highlighted option.
This is the behaviour of hitting any letter/digit: jump to the next option which prompt starts with that letter. The only letters that do not behave as such are 'y' 'm' and 'n'. Prompts that start with one of those three letters are instead matched on the first letter that is not 'y', 'm' or 'n'.
Fix that by treating 'space' as we treat y/m/n, ie. as an action key, not as shortcut to jump to prompt.
Quoted 7 lines
Signed-off-by "Yann E. MORIN" <[email protected]>Cc Thomas Petazzoni <[email protected]>Cc Peter Korsgaard <[email protected]>Cc Samuel Martin <[email protected]>Cc Thomas De Schampheleire <[email protected]>---
Note: I'll be running this upstream soonish.
Thanks?
Quoted 3 lines
--- support/kconfig/lxdialog/menubox.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Shouldn't we also update the patches in support/kconfig/patches/ ?
Thanks,
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
PATCH 1/1 support/kconfig: fix 'space' to (de)select options
Thomas, All,
On 2013-11-13 22:55 +0100, Thomas Petazzoni spake thusly:
Quoted 5 lines · Yann E. MORIN
Quoted 2 lines
support/kconfig/lxdialog/menubox.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)Shouldn't we also update the patches in support/kconfig/patches/ ?
Doh... :-(
Sure, will do.
Regards,
Yann E. MORIN.
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------'