All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] support/kconfig: fix 'space' to (de)select options
@ 2013-11-13 21:53 Yann E. MORIN
  2013-11-13 21:55 ` Thomas Petazzoni
  0 siblings, 1 reply; 3+ messages in thread
From: Yann E. MORIN @ 2013-11-13 21:53 UTC (permalink / raw)
  To: buildroot

From: "Yann E. MORIN" <yann.morin.1998@free.fr>

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.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Cc: Peter Korsgaard <jacmet@uclibc.org>
Cc: Samuel Martin <s.martin49@gmail.com>
Cc: Thomas De Schampheleire <patrickdepinguin@gmail.com>
---
Note: I'll be running this upstream soonish.
---
 support/kconfig/lxdialog/menubox.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/support/kconfig/lxdialog/menubox.c b/support/kconfig/lxdialog/menubox.c
index 48d382e..6fc7e78 100644
--- a/support/kconfig/lxdialog/menubox.c
+++ b/support/kconfig/lxdialog/menubox.c
@@ -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++) {
-- 
1.8.1.2

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [Buildroot] [PATCH] support/kconfig: fix 'space' to (de)select options
  2013-11-13 21:53 [Buildroot] [PATCH] support/kconfig: fix 'space' to (de)select options Yann E. MORIN
@ 2013-11-13 21:55 ` Thomas Petazzoni
  2013-11-13 21:59   ` Yann E. MORIN
  0 siblings, 1 reply; 3+ messages in thread
From: Thomas Petazzoni @ 2013-11-13 21:55 UTC (permalink / raw)
  To: buildroot

Dear Yann E. MORIN,

On Wed, 13 Nov 2013 22:53:13 +0100, Yann E. MORIN wrote:
> From: "Yann E. MORIN" <yann.morin.1998@free.fr>
> 
> 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.
> 
> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> Cc: Peter Korsgaard <jacmet@uclibc.org>
> Cc: Samuel Martin <s.martin49@gmail.com>
> Cc: Thomas De Schampheleire <patrickdepinguin@gmail.com>
> ---
> Note: I'll be running this upstream soonish.

Thanks?

> ---
>  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
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Buildroot] [PATCH] support/kconfig: fix 'space' to (de)select options
  2013-11-13 21:55 ` Thomas Petazzoni
@ 2013-11-13 21:59   ` Yann E. MORIN
  0 siblings, 0 replies; 3+ messages in thread
From: Yann E. MORIN @ 2013-11-13 21:59 UTC (permalink / raw)
  To: buildroot

Thomas, All,

On 2013-11-13 22:55 +0100, Thomas Petazzoni spake thusly:
> On Wed, 13 Nov 2013 22:53:13 +0100, Yann E. MORIN wrote:
> >  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.

-- 
.-----------------.--------------------.------------------.--------------------.
|  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.  |
'------------------------------^-------^------------------^--------------------'

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-11-13 21:59 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-11-13 21:53 [Buildroot] [PATCH] support/kconfig: fix 'space' to (de)select options Yann E. MORIN
2013-11-13 21:55 ` Thomas Petazzoni
2013-11-13 21:59   ` Yann E. MORIN

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.