From: Thomas Roessler Date: Wed, 7 Oct 1998 15:43:00 +0000 (+0000) Subject: Fix the error message for unbound keys. From Vikas. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=52cb07aa6e2ceff6f18918b0f12423b34a1332d2;p=neomutt Fix the error message for unbound keys. From Vikas. --- diff --git a/keymap.c b/keymap.c index 63cf4e3d4..5f792e8a7 100644 --- 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.");