]> granicus.if.org Git - mutt/commitdiff
macro_function.2-3, from Vikas.
authorThomas Roessler <roessler@does-not-exist.org>
Mon, 5 Oct 1998 21:07:39 +0000 (21:07 +0000)
committerThomas Roessler <roessler@does-not-exist.org>
Mon, 5 Oct 1998 21:07:39 +0000 (21:07 +0000)
curs_lib.c
keymap.c

index fe1533986001a715c2be46be833b707f2f6eb6a9..d086f9df905838710a3546b52e2cf91da1b3d887 100644 (file)
@@ -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;
index c72213f541709d6504040c25391e6407803e0747..8fc8e25ba8d4c00df3fbd43dfb1623c5fb7c2ac6 100644 (file)
--- 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 */