diff options
| -rwxr-xr-x | menuconfig.py | 17 |
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() |
