diff options
author | Thomas Roessler <roessler@does-not-exist.org> | 1998-10-05 18:24:42 +0000 |
---|---|---|
committer | Thomas Roessler <roessler@does-not-exist.org> | 1998-10-05 18:24:42 +0000 |
commit | f9fb45338e02ec7171f58b91ba89554f3ea57098 (patch) | |
tree | deac7277476c9626dca43c485d6458574a2b674e /browser.c | |
parent | ee4d0e3176cd0cb6778ce9fbd4ce2b7d8123fe2e (diff) |
Vikas' macro_function patch.
Diffstat (limited to 'browser.c')
-rw-r--r-- | browser.c | 21 |
1 files changed, 15 insertions, 6 deletions
@@ -465,6 +465,7 @@ 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)); @@ -515,7 +516,7 @@ void mutt_select_file (char *f, size_t flen, int buffy) return; menu = mutt_new_menu (); - menu->menu = MENU_FOLDER; + menu->menu = CurrentMenu = MENU_FOLDER; menu->make_entry = folder_entry; menu->search = select_file_search; menu->title = title; @@ -624,6 +625,7 @@ void mutt_select_file (char *f, size_t flen, int buffy) destroy_state (&state); mutt_menuDestroy (&menu); + CurrentMenu = savedmenu; return; case OP_BROWSER_TELL: @@ -662,6 +664,7 @@ 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; } } @@ -718,6 +721,7 @@ void mutt_select_file (char *f, size_t flen, int buffy) { mutt_error _("Error scanning directory."); mutt_menuDestroy (&menu); + CurrentMenu = savedmenu; return; } killPrefix = 0; @@ -736,6 +740,7 @@ void mutt_select_file (char *f, size_t flen, int buffy) { int reverse = 0; + event_t ch; move (LINES - 1, 0); if (i == OP_SORT_REVERSE) @@ -747,18 +752,21 @@ void mutt_select_file (char *f, size_t flen, int buffy) } clrtoeol (); - while ((i = mutt_getch ()) != EOF && i != 'a' && i != 'd' && i != 'z' - && i != 'n') + FOREVER { - if (i == ERR || CI_is_return (i)) + ch = mutt_getch(); + if (ch.ch == EOF || ch.ch == 'a' || ch.ch == 'd' || ch.ch == 'z' || ch.ch == 'n') + break; + + if (ch.ch == ERR || CI_is_return (ch.ch)) break; else BEEP (); } - if (i != EOF) + if (ch.ch != EOF) { - switch (i) + switch (ch.ch) { case 'a': BrowserSort = reverse | SORT_SUBJECT; @@ -805,6 +813,7 @@ 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); |