From 52cb07aa6e2ceff6f18918b0f12423b34a1332d2 Mon Sep 17 00:00:00 2001 From: Thomas Roessler Date: Wed, 7 Oct 1998 15:43:00 +0000 Subject: [PATCH] Fix the error message for unbound keys. From Vikas. --- keymap.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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."); -- 2.40.0