]> granicus.if.org Git - neomutt/commitdiff
Fix the error message for unbound keys. From Vikas.
authorThomas Roessler <roessler@does-not-exist.org>
Wed, 7 Oct 1998 15:43:00 +0000 (15:43 +0000)
committerThomas Roessler <roessler@does-not-exist.org>
Wed, 7 Oct 1998 15:43:00 +0000 (15:43 +0000)
keymap.c

index 63cf4e3d45673879f2b64ddee6b9c4f7e1df8441..5f792e8a730dd9078109cf9ba35f8ff600712d6a 100644 (file)
--- a/keymap.c
+++ b/keymap.c
@@ -600,8 +600,12 @@ void km_init (void)
 void km_error_key (int menu)
 {
   char buf[SHORT_STRING];
+  struct keymap_t *key;
 
-  if (km_expand_key (buf, sizeof (buf), km_find_func (menu, OP_HELP)))
+  if(!(key = km_find_func(menu, OP_HELP)))
+    key = km_find_func(MENU_GENERIC, OP_HELP);
+  
+  if(km_expand_key(buf, sizeof(buf), key))
     mutt_error (_("Key is not bound.  Press '%s' for help."), buf);
   else
     mutt_error _("Key is not bound.  See the manual.");