From ca84c353b5ab7a66844eb2057e31411e92c3d2b8 Mon Sep 17 00:00:00 2001 From: Kalle Olavi Niemitalo Date: Mon, 15 May 2006 00:15:08 +0300 Subject: [PATCH] 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. --- src/bfu/menu.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/bfu/menu.c b/src/bfu/menu.c index 127b54da9..96bda7481 100644 --- a/src/bfu/menu.c +++ b/src/bfu/menu.c @@ -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; } }