From 3d59127ca3a3138d255887f45af90bc91b37713c Mon Sep 17 00:00:00 2001 From: Tomasz Gorochowik Date: Tue, 12 Jun 2018 15:24:40 +0200 Subject: 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 --- menuconfig.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'menuconfig.py') 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 -- cgit v1.2.3