From: Frank T. <ft...@be...> - 2006-09-21 10:08:31
|
--- help.c | 17 ++++++++++++++--- ui_curses.c | 4 ++-- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/help.c b/help.c index 20928ad..1491e21 100644 --- a/help.c +++ b/help.c @@ -8,7 +8,6 @@ #include "window.h" #include "search.h" #include "misc.h" #include "xmalloc.h" -#include "debug.h" #include "keys.h" #include "command_mode.h" @@ -50,8 +49,20 @@ static int help_search_matches(void *dat matched = 1; break; } - if ( 0 ) - break; + if (ent->type == HE_TEXT) { + if (!u_strcasestr(ent->text, words[i])) + break; + } + else if (ent->type == HE_BOUND) { + if (!u_strcasestr(key_context_names[ent->binding->ctx], words[i]) + && !u_strcasestr(ent->binding->cmd, words[i]) + && !u_strcasestr(ent->binding->key->name, words[i])) + break; + } + else if (ent->type == HE_UNBOUND) { + if (!u_strcasestr(ent->command->name, words[i])) + break; + } } } free_str_array(words); diff --git a/ui_curses.c b/ui_curses.c index 6d7eb91..c55b1a4 100644 --- a/ui_curses.c +++ b/ui_curses.c @@ -1396,7 +1396,7 @@ void search_not_found(void) what = "Filter"; break; case HELP_VIEW: - what = "Keybindings/Unbound Commands"; + what = "Help Item"; break; } } else { @@ -1414,7 +1414,7 @@ void search_not_found(void) what = "Filter"; break; case HELP_VIEW: - what = "Keybindings/Unbound Commands"; + what = "Help Item"; break; } } -- 1.4.2.g9a8e |