summaryrefslogtreecommitdiff
path: root/src/plugins/plugin-api.c
diff options
context:
space:
mode:
authorSebastien Helleu <flashcode@flashtux.org>2011-07-10 23:07:33 +0200
committerSebastien Helleu <flashcode@flashtux.org>2011-07-10 23:07:33 +0200
commitcb4e0d007676df297cd50524292cad4aa0754a8c (patch)
tree2034e3ce62f93f1d40714e5c429371338f34b69f /src/plugins/plugin-api.c
parentcd5b216e0feb5869118a7fb00d84e3380b10c3fa (diff)
downloadweechat-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.c7
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"),