diff options
author | Sebastien Helleu <flashcode@flashtux.org> | 2011-07-10 23:07:33 +0200 |
---|---|---|
committer | Sebastien Helleu <flashcode@flashtux.org> | 2011-07-10 23:07:33 +0200 |
commit | cb4e0d007676df297cd50524292cad4aa0754a8c (patch) | |
tree | 2034e3ce62f93f1d40714e5c429371338f34b69f /src/plugins/plugin-api.c | |
parent | cd5b216e0feb5869118a7fb00d84e3380b10c3fa (diff) | |
download | weechat-cb4e0d007676df297cd50524292cad4aa0754a8c.zip |
core: allow empty argument for infolist "key" (return context "default")
Diffstat (limited to 'src/plugins/plugin-api.c')
-rw-r--r-- | src/plugins/plugin-api.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/plugins/plugin-api.c b/src/plugins/plugin-api.c index e5b85558a..7e3861541 100644 --- a/src/plugins/plugin-api.c +++ b/src/plugins/plugin-api.c @@ -679,7 +679,10 @@ plugin_api_infolist_get_internal (void *data, const char *infolist_name, ptr_infolist = infolist_new (); if (ptr_infolist) { - context = gui_key_search_context (arguments); + if (arguments && arguments[0]) + context = gui_key_search_context (arguments); + else + context = GUI_KEY_CONTEXT_DEFAULT; if (context >= 0) { for (ptr_key = gui_keys[context]; ptr_key; @@ -1036,7 +1039,7 @@ plugin_api_init () &plugin_api_infolist_get_internal, NULL); hook_infolist (NULL, "key", N_("list of key bindings"), NULL, - NULL, + N_("context (\"default\" or \"search\") (optional)"), &plugin_api_infolist_get_internal, NULL); hook_infolist (NULL, "nicklist", N_("nicks in nicklist for a buffer"), N_("buffer pointer"), |