mirror of
https://github.com/rkd77/elinks.git
synced 2024-12-04 14:46:47 -05:00
Properly deselect the main menu instead of crashing
In send_kbd_event, use deselect_mainmenu to get rid of the main menu instead of delete_window. This fixes bug 747.
This commit is contained in:
parent
62a216a6fa
commit
588fa3ece8
@ -64,7 +64,7 @@ static void display_mainmenu(struct terminal *term, struct menu *menu);
|
||||
static void set_menu_selection(struct menu *menu, int pos);
|
||||
|
||||
|
||||
static void
|
||||
void
|
||||
deselect_mainmenu(struct terminal *term, struct menu *menu)
|
||||
{
|
||||
menu->selected = -1;
|
||||
|
@ -175,5 +175,6 @@ add_to_menu(struct menu_item **mi, unsigned char *text, unsigned char *rtext,
|
||||
void do_menu(struct terminal *, struct menu_item *, void *, int);
|
||||
void do_menu_selected(struct terminal *, struct menu_item *, void *, int, int);
|
||||
void do_mainmenu(struct terminal *, struct menu_item *, void *, int);
|
||||
void deselect_mainmenu(struct terminal *term, struct menu *menu);
|
||||
|
||||
#endif
|
||||
|
@ -1171,7 +1171,8 @@ quit:
|
||||
win = ses->tab->term->windows.next;
|
||||
win->handler(win, ev);
|
||||
if (ses->tab->term->windows.next == win) {
|
||||
delete_window(win);
|
||||
deselect_mainmenu(win->term, win->data);
|
||||
print_screen_status(ses);
|
||||
get_kbd_modifier(ev) |= KBD_MOD_ALT;
|
||||
|
||||
return NULL;
|
||||
|
Loading…
Reference in New Issue
Block a user