1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-12-04 14:46:47 -05:00

BFU: Display the main menu immediately when activating it.

This fixes two bugs:
1. Pressing F9 did not make the main menu visible, but then pressing
   e.g. Right made it visible.
2. Pressing F9 and then Down displayed the first submenu (File) at the
   wrong position on the screen.
This commit is contained in:
Kalle Olavi Niemitalo 2006-05-15 00:15:08 +03:00 committed by Kalle Olavi Niemitalo
parent 2e42b2d4df
commit ca84c353b5

View File

@ -60,6 +60,7 @@ static int m_submenu_len = sizeof(m_submenu) - 1;
/* Prototypes */
static window_handler_T menu_handler;
static window_handler_T mainmenu_handler;
static void display_mainmenu(struct terminal *term, struct menu *menu);
static inline int
@ -911,6 +912,7 @@ do_mainmenu(struct terminal *term, struct menu_item *items,
if (win->data == menu) {
del_from_list(win);
add_at_pos((struct window *) &term->windows, win);
display_mainmenu(term, menu);
break;
}
}