diff --git a/ChangeLog b/ChangeLog index cb04bfeb1..e0846ea4d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-02-09 Robert Millan + + * normal/menu.c (run_menu): If timeout is set to zero, don't bother + drawing the menu. + 2008-02-09 Robert Millan * commands/sleep.c: New file. diff --git a/normal/menu.c b/normal/menu.c index 5d120b917..1d4d4ec73 100644 --- a/normal/menu.c +++ b/normal/menu.c @@ -339,6 +339,10 @@ run_menu (grub_menu_t menu, int nested) if (default_entry < 0 || default_entry >= menu->size) default_entry = 0; + /* If timeout is 0, drawing is pointless (and ugly). */ + if (get_timeout () == 0) + return default_entry; + offset = default_entry; if (offset > GRUB_TERM_NUM_ENTRIES - 1) {