summaryrefslogtreecommitdiffstats
path: root/scripts/kconfig/lxdialog
diff options
context:
space:
mode:
authorDirk Gouders <dirk@gouders.net>2013-05-19 21:48:44 +0200
committerYann E. MORIN <yann.morin.1998@free.fr>2013-05-30 00:13:32 +0200
commit063f4661fde8c03c4c03f8a205071a52691c152e (patch)
tree59bb40ca59243d85c9ce2710bfb8b968e43b097c /scripts/kconfig/lxdialog
parent57a9c7609d7418ce75324df38f66cd7d937a77cb (diff)
downloadop-kernel-dev-063f4661fde8c03c4c03f8a205071a52691c152e.zip
op-kernel-dev-063f4661fde8c03c4c03f8a205071a52691c152e.tar.gz
mconf: handle keys in empty dialogs
When entering an empty dialog, using the movement keys resulted in unexpected characters beeing displayed, other keys like "z" and "h" did not work as expected. This patch handles the movement keys as well as other keys, especially "z", "h" and "/". Signed-off-by: Dirk Gouders <dirk@gouders.net> [yann.morin.1998@free.fr: keep lines <80 chars, so reorder test] Tested-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Diffstat (limited to 'scripts/kconfig/lxdialog')
-rw-r--r--scripts/kconfig/lxdialog/menubox.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/scripts/kconfig/lxdialog/menubox.c b/scripts/kconfig/lxdialog/menubox.c
index 48d382e..38cd69c 100644
--- a/scripts/kconfig/lxdialog/menubox.c
+++ b/scripts/kconfig/lxdialog/menubox.c
@@ -303,10 +303,11 @@ do_resize:
}
}
- if (i < max_choice ||
- key == KEY_UP || key == KEY_DOWN ||
- key == '-' || key == '+' ||
- key == KEY_PPAGE || key == KEY_NPAGE) {
+ if (item_count() != 0 &&
+ (i < max_choice ||
+ key == KEY_UP || key == KEY_DOWN ||
+ key == '-' || key == '+' ||
+ key == KEY_PPAGE || key == KEY_NPAGE)) {
/* Remove highligt of current item */
print_item(scroll + choice, choice, FALSE);
OpenPOWER on IntegriCloud