summaryrefslogtreecommitdiffstats
path: root/help.c
diff options
context:
space:
mode:
authorKevin McCarthy <kevin@8t8.us>2021-07-28 15:44:57 -0700
committerKevin McCarthy <kevin@8t8.us>2021-07-28 19:34:13 -0700
commit02298c190f6509762bd826a1aeeec43acd4c41da (patch)
tree8099ed50f648f0ae5e5ca54b648d8de01125aa4a /help.c
parent4021ab59f021abd84742ae36895158c7129cbb38 (diff)
Improve generic menu type handling.
Some of the menus are directly of MENU_GENERIC type. In a few places, Mutt handles those inefficiently or slightly incorrectly. Remove double "generic" lookups when Mutt is in a generic menu. Fix the help menu to not show unbound or "generic bindings" for a generic menu. For exec completion, always add generic functions to the possible completion list.
Diffstat (limited to 'help.c')
-rw-r--r--help.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/help.c b/help.c
index 2dcfed1b..29dda797 100644
--- a/help.c
+++ b/help.c
@@ -36,7 +36,7 @@ static const struct menu_func_op_t *help_lookupFunction (int op, int menu)
int i;
const struct menu_func_op_t *map;
- if (menu != MENU_PAGER)
+ if (menu != MENU_PAGER && menu != MENU_GENERIC)
{
/* first look in the generic map for the function */
for (i = 0; OpGeneric[i].name; i++)
@@ -362,7 +362,7 @@ void mutt_help (int menu)
}
dump_menu (f, menu);
- if (menu != MENU_EDITOR && menu != MENU_PAGER)
+ if (menu != MENU_EDITOR && menu != MENU_PAGER && menu != MENU_GENERIC)
{
fputs (_("\nGeneric bindings:\n\n"), f);
dump_menu (f, MENU_GENERIC);
@@ -371,7 +371,7 @@ void mutt_help (int menu)
fputs (_("\nUnbound functions:\n\n"), f);
if (funcs)
dump_unbound (f, funcs, Keymaps[menu], NULL);
- if (menu != MENU_PAGER)
+ if (menu != MENU_EDITOR && menu != MENU_PAGER && menu != MENU_GENERIC)
dump_unbound (f, OpGeneric, Keymaps[MENU_GENERIC], Keymaps[menu]);
safe_fclose (&f);