summaryrefslogtreecommitdiff
path: root/menuconfig.py
diff options
context:
space:
mode:
authorUlf Magnusson <ulfalizer@gmail.com>2018-05-11 22:56:27 +0200
committerUlf Magnusson <ulfalizer@gmail.com>2018-05-11 22:58:42 +0200
commit63d0f4cec6be76f7ce0818bb23369f378b7695f3 (patch)
tree7cff34fcdd5f3e47e81b7af4f4cfa2953ce16659 /menuconfig.py
parentf3aec07cf475a8b1347559dae147b974de2012c5 (diff)
menuconfig: Jump-to code nit
Diffstat (limited to 'menuconfig.py')
-rwxr-xr-xmenuconfig.py17
1 files changed, 8 insertions, 9 deletions
diff --git a/menuconfig.py b/menuconfig.py
index 097abbb..0a3b542 100755
--- a/menuconfig.py
+++ b/menuconfig.py
@@ -1513,21 +1513,20 @@ def _draw_jump_to_dialog(edit_box, matches_win, bot_sep_win, help_win,
matches_win.erase()
- if bad_re is not None:
- # bad_re holds the error message from the re.error exception on errors
- _safe_addstr(matches_win, 0, 0,
- "Bad regular expression: " + bad_re)
-
- elif not matches:
- _safe_addstr(matches_win, 0, 0, "No matches")
-
- else:
+ if matches:
for i in range(scroll,
min(scroll + matches_win.getmaxyx()[0], len(matches))):
_safe_addstr(matches_win, i - scroll, 0, matches[i][1],
_LIST_SEL_STYLE if i == sel_node_i else _LIST_STYLE)
+ else:
+ # bad_re holds the error message from the re.error exception on errors
+ _safe_addstr(matches_win, 0, 0,
+ "No matches"
+ if bad_re is None else
+ "Bad regular expression: " + bad_re)
+
matches_win.noutrefresh()