]> granicus.if.org Git - mutt/commitdiff
Fix macro functions for the pager menu.
authorThomas Roessler <roessler@does-not-exist.org>
Wed, 7 Oct 1998 17:09:03 +0000 (17:09 +0000)
committerThomas Roessler <roessler@does-not-exist.org>
Wed, 7 Oct 1998 17:09:03 +0000 (17:09 +0000)
curs_lib.c
keymap.c

index f05ad21d1f4a1b3f352d86b53ee6d7cc65d7a6b0..f1f6aa1e65651488c1f67ea757f426480cb4fb0f 100644 (file)
@@ -141,7 +141,7 @@ int mutt_yesorno (const char *msg, int def)
   {
     mutt_refresh ();
     ch = mutt_getch ();
-    if (ch.ch == ERR) return(-1);
+    if (ch.ch == -1) return(-1);
     if (CI_is_return (ch.ch))
       break;
     else if (tolower(ch.ch) == tolower(*yes))
index af6b97d50d74a1badb0d9feb633c0bd055e0ec6f..24fc53a552fd11178a17ca04d348103c628839a3 100644 (file)
--- a/keymap.c
+++ b/keymap.c
@@ -350,15 +350,15 @@ int km_dokey (int menu)
       char *func = NULL;
       struct binding_t *bindings;
 
-      /* is this a valid op for the current menu? */
-      bindings = km_get_table (CurrentMenu);
+      /* is this a valid op for this menu? */
+      bindings = km_get_table (menu);
       if ((func = get_func (bindings, tmp.op)))
        return tmp.op;
 
       if (menu == MENU_EDITOR && get_func (OpEditor, tmp.op))
        return tmp.op;
 
-      if (menu != MENU_EDITOR && CurrentMenu != MENU_PAGER)
+      if (menu != MENU_EDITOR && menu != MENU_PAGER)
       {
        /* check generic menu */
        bindings = OpGeneric; 
@@ -804,11 +804,12 @@ int mutt_parse_exec (BUFFER *buf, BUFFER *s, unsigned long data, BUFFER *err)
     mutt_extract_token (buf, s, 0);
     command = buf->data;
 
-    if ((bindings = km_get_table (CurrentMenu)) == NULL)
+    if ((bindings = km_get_table (CurrentMenu)) == NULL 
+       && CurrentMenu != MENU_PAGER)
       bindings = OpGeneric;
     
     ops[nops] = get_op (bindings, command, strlen(command));
-    if (ops[nops] == OP_NULL)
+    if (ops[nops] == OP_NULL && CurrentMenu != MENU_PAGER)
       ops[nops] = get_op (OpGeneric, command, strlen(command));
     
     if (ops[nops] == OP_NULL)