summaryrefslogtreecommitdiffstats
path: root/browser.c
diff options
context:
space:
mode:
authorThomas Roessler <roessler@does-not-exist.org>1998-10-12 19:53:42 +0000
committerThomas Roessler <roessler@does-not-exist.org>1998-10-12 19:53:42 +0000
commit187ac0ce86e8aa5f8103fedfc68f2ca7acf2137c (patch)
tree4963c8671ed6b33d9a8856c3590c18c5c09c919c /browser.c
parentd6b1a4d9eccd565bbafa82aee1dfbf085a4f47e2 (diff)
The attached patch removes some redundant code related to the macro
function stuff. Since each menu calls km_dokey() to get the 'op' number to execute, the 'menu' argument to km_dokey() _is_ the CurrentMenu. Hence, there is no need to explicitly save/restore the CurrentMenu all over the code. The only places it is being captured now is just before mutt_enter_comamnd() is called. This is to help the 'exec' command completion code so that it knows which menu to try and complete the function name from. (From: Vikas Agnihotri <VikasA@att.com>)
Diffstat (limited to 'browser.c')
-rw-r--r--browser.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/browser.c b/browser.c
index 6b84a7c4..adfa2177 100644
--- a/browser.c
+++ b/browser.c
@@ -465,7 +465,6 @@ void mutt_select_file (char *f, size_t flen, int buffy)
MUTTMENU *menu;
struct stat st;
int i, killPrefix = 0;
- int savedmenu = CurrentMenu;
memset (&state, 0, sizeof (struct browser_state));
@@ -516,7 +515,7 @@ void mutt_select_file (char *f, size_t flen, int buffy)
return;
menu = mutt_new_menu ();
- menu->menu = CurrentMenu = MENU_FOLDER;
+ menu->menu = MENU_FOLDER;
menu->make_entry = folder_entry;
menu->search = select_file_search;
menu->title = title;
@@ -625,7 +624,6 @@ void mutt_select_file (char *f, size_t flen, int buffy)
destroy_state (&state);
mutt_menuDestroy (&menu);
- CurrentMenu = savedmenu;
return;
case OP_BROWSER_TELL:
@@ -664,7 +662,6 @@ void mutt_select_file (char *f, size_t flen, int buffy)
mutt_error _("Error scanning directory.");
destroy_state (&state);
mutt_menuDestroy (&menu);
- CurrentMenu = savedmenu;
return;
}
}
@@ -721,7 +718,6 @@ void mutt_select_file (char *f, size_t flen, int buffy)
{
mutt_error _("Error scanning directory.");
mutt_menuDestroy (&menu);
- CurrentMenu = savedmenu;
return;
}
killPrefix = 0;
@@ -818,7 +814,6 @@ void mutt_select_file (char *f, size_t flen, int buffy)
strfcpy (f, buf, flen);
destroy_state (&state);
mutt_menuDestroy (&menu);
- CurrentMenu = savedmenu;
return;
}
MAYBE_REDRAW (menu->redraw);