summaryrefslogtreecommitdiff
path: root/menuconfig.py
diff options
context:
space:
mode:
authorTomasz Gorochowik <tgorochowik@antmicro.com>2018-06-12 15:24:40 +0200
committerUlf Magnusson <ulfalizer@gmail.com>2018-06-12 15:42:17 +0200
commit3d59127ca3a3138d255887f45af90bc91b37713c (patch)
tree61fee2efbe9dc0661c74d302a8bdb363d40e127e /menuconfig.py
parent0327db2e642800a1608b006cd6c569f7bca0ff5c (diff)
menuconfig: Fix searching for nonexistent objects
This commit fixes an issue when user searches for a nonexistent object (e.g. adsdsaasda) and presses enter. Having all the key checks in one continuous if statement makes sure that the very last 'else' statement does not get executed when enter is pressed. Note - backported from: https://github.com/zephyrproject-rtos/zephyr/pull/8332
Diffstat (limited to 'menuconfig.py')
-rwxr-xr-xmenuconfig.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/menuconfig.py b/menuconfig.py
index 7d6a064..bf8396d 100755
--- a/menuconfig.py
+++ b/menuconfig.py
@@ -1534,12 +1534,11 @@ def _jump_to_dialog():
_safe_curs_set(0)
return True
- if c == "\x1B": # \x1B = ESC
+ elif c == "\x1B": # \x1B = ESC
_safe_curs_set(0)
return False
-
- if c == curses.KEY_RESIZE:
+ elif c == curses.KEY_RESIZE:
# We adjust the scroll so that the selected node stays visible in
# the list when the terminal is resized, hence the 'scroll'
# assignment