kconfig: lxdialog: fix 'space' to (de)select options
authorYann E. MORIN <yann.morin.1998@free.fr>
Wed, 13 Nov 2013 23:53:32 +0000 (00:53 +0100)
committerMasahiro Yamada <masahiroy@kernel.org>
Tue, 24 Jun 2025 11:30:27 +0000 (20:30 +0900)
commit694174f94ebeeb5ec5cc0e9de9b40c82057e1d95
tree205f6612a6821ad89eda05c2be16b179fba18976
parent0a1eab129fedb4281e65c845b04be02b53c99f9c
kconfig: lxdialog: fix 'space' to (de)select options

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>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Signed-off-by: Cherniaev Andrei <dungeonlords789@naver.com>
[masahiro: took from Buildroot, adjusted the commit subject]
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
scripts/kconfig/lxdialog/menubox.c