From 91f4a75562a58390638189e136a797468b0f0ed9 Mon Sep 17 00:00:00 2001 From: Pavel Roskin Date: Tue, 24 Sep 2002 15:04:22 +0000 Subject: [PATCH] * editmenu.c (edit_drop_menu_cmd): Don't use edit_dlg variable. --- edit/ChangeLog | 2 ++ edit/editmenu.c | 14 ++++++++++---- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/edit/ChangeLog b/edit/ChangeLog index d53372360..b267593b8 100644 --- a/edit/ChangeLog +++ b/edit/ChangeLog @@ -1,5 +1,7 @@ 2002-09-24 Pavel Roskin + * editmenu.c (edit_drop_menu_cmd): Don't use edit_dlg variable. + * edit.c: Remove all references to CR_LF_TRANSLATION. * editcmd.c: Likewise. diff --git a/edit/editmenu.c b/edit/editmenu.c index 67ff1af36..647dc07b3 100644 --- a/edit/editmenu.c +++ b/edit/editmenu.c @@ -300,16 +300,22 @@ void edit_done_menu (void) } -void edit_drop_menu_cmd (WEdit * e, int which) +void +edit_drop_menu_cmd (WEdit * e, int which) { if (edit_menubar->active) return; edit_menubar->active = 1; edit_menubar->dropped = drop_menus; - edit_menubar->previous_selection = which >= 0 ? which : dlg_item_number (edit_dlg); - if (which >= 0) + if (which >= 0) { edit_menubar->selected = which; - dlg_select_widget (edit_dlg, edit_menubar); + edit_menubar->previous_selection = which; + } else { + edit_menubar->previous_selection = + dlg_item_number (e->widget.parent); + } + + dlg_select_widget (e->widget.parent, edit_menubar); } -- 2.11.4.GIT