From c97f93d25ccd4fdfab3ab764efaf465c430c09c1 Mon Sep 17 00:00:00 2001 From: Thomas Roessler Date: Mon, 5 Oct 1998 21:07:39 +0000 Subject: [PATCH] macro_function.2-3, from Vikas. --- curs_lib.c | 6 +++--- keymap.c | 4 ++++ 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/curs_lib.c b/curs_lib.c index fe153398..d086f9df 100644 --- a/curs_lib.c +++ b/curs_lib.c @@ -131,8 +131,8 @@ void mutt_edit_file (const char *editor, const char *data) int mutt_yesorno (const char *msg, int def) { event_t ch; - const char *yes = _("yes"); - const char *no = _("no"); + char *yes = _("yes"); + char *no = _("no"); CLEARLINE(LINES-1); printw("%s ([%c]/%c): ", msg, def ? *yes : *no, @@ -328,7 +328,7 @@ int mutt_enter_fname (const char *prompt, char *buf, size_t blen, int *redraw, i char *pc = safe_malloc (strlen (prompt) + 3); sprintf (pc, "%s: ", prompt); - mutt_ungetch (ch.ch, 0); + mutt_ungetch (ch.op ? 0 : ch.ch, ch.op ? ch.op : 0); if (mutt_get_field (pc, buf, blen, (buffy ? M_EFILE : M_FILE) | M_CLEAR) != 0) buf[0] = 0; diff --git a/keymap.c b/keymap.c index c72213f5..8fc8e25b 100644 --- a/keymap.c +++ b/keymap.c @@ -351,6 +351,10 @@ int km_dokey (int menu) bindings = km_get_table (CurrentMenu); if ((func = get_func (bindings, tmp.op))) return tmp.op; + + if (menu == MENU_EDITOR) + return tmp.op; + if (CurrentMenu != MENU_PAGER) { /* check generic menu */ -- 2.40.0