16-fix-space-to-de-select-options.patch 1.6 KB

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