diff options
author | H. Peter Anvin <hpa@zytor.com> | 2008-02-19 18:27:35 -0800 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2008-02-19 18:27:35 -0800 |
commit | 905ba26066f92b6ad64941dbfbb0463112b35275 (patch) | |
tree | 7d24d7c4305a666eba76aa8848f171586b4926ca /com32/menu/menumain.c | |
parent | 3710870073b0183bb312c676392738207cd75616 (diff) | |
download | syslinux-905ba26066f92b6ad64941dbfbb0463112b35275.tar.gz |
simple menu: fix the handling of '+' and '-' given disabled entries
When encountering disabled entries, we want to keep going. Given that
these particular keys have nonstandard scrolling, but the handling there.
Diffstat (limited to 'com32/menu/menumain.c')
-rw-r--r-- | com32/menu/menumain.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/com32/menu/menumain.c b/com32/menu/menumain.c index 2bbbc4f8..73049867 100644 --- a/com32/menu/menumain.c +++ b/com32/menu/menumain.c @@ -914,13 +914,17 @@ run_menu(void) break; case '-': - entry--; - top--; + do { + entry--; + top--; + } while (entry > 0 && is_disabled(cm->menu_entries[entry])); break; case '+': - entry++; - top++; + do { + entry++; + top++; + } while (entry < cm->nentries-1 && is_disabled(cm->menu_entries[entry])); break; case KEY_CTRL('A'): |