diff options
| author | Ulf Magnusson <ulfalizer@gmail.com> | 2019-05-22 08:18:48 +0200 |
|---|---|---|
| committer | Ulf Magnusson <ulfalizer@gmail.com> | 2019-05-22 08:30:53 +0200 |
| commit | f9622694c5221a0b0f74bf345c5ef832ed79c16a (patch) | |
| tree | ac403a6e6a941266e599ed290fb48a56434cac90 /menuconfig.py | |
| parent | 383c8b8a998d05dc0631228bf8c1c5c92f9c9738 (diff) | |
menuconfig: Fix inconsistent top/bottom scroll offset due to off-by-one
The scroll offset when scrolling up was one more than when scrolling
down, due to an off-by-one.
Diffstat (limited to 'menuconfig.py')
| -rwxr-xr-x | menuconfig.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/menuconfig.py b/menuconfig.py index f804057..8ecf611 100755 --- a/menuconfig.py +++ b/menuconfig.py @@ -1219,7 +1219,7 @@ def _select_prev_menu_entry(): _sel_node_i -= 1 # See _select_next_menu_entry() - if _sel_node_i <= _menu_scroll + _SCROLL_OFFSET: + if _sel_node_i < _menu_scroll + _SCROLL_OFFSET: _menu_scroll = max(_menu_scroll - 1, 0) @@ -2034,7 +2034,7 @@ def _jump_to_dialog(): if sel_node_i > 0: sel_node_i -= 1 - if sel_node_i <= scroll + _SCROLL_OFFSET: + if sel_node_i < scroll + _SCROLL_OFFSET: scroll = max(scroll - 1, 0) while True: |
