1
0
mirror of https://github.com/weechat/weechat.git synced 2026-07-08 02:33:12 +02:00

Fixed completion for command handlers (now empty completion_template means nick completion, "-" string means no completion at all)

This commit is contained in:
Sebastien Helleu
2006-07-27 16:04:46 +00:00
parent 451f623c98
commit 06cc936937
12 changed files with 22 additions and 16 deletions
+2 -1
View File
@@ -820,7 +820,8 @@ completion_build_list (t_completion *completion)
int max_arg, i;
completion_get_command_infos (completion, &template, &max_arg);
if (!template || (completion->base_command_arg > max_arg))
if (!template || (strcmp (template, "-") == 0) ||
(completion->base_command_arg > max_arg))
{
completion_stop (completion);
return;
+1 -1
View File
@@ -301,7 +301,7 @@ plugin_cmd_handler_add (t_weechat_plugin *plugin, char *command,
new_handler->description = (description) ? strdup (description) : NULL;
new_handler->arguments = (arguments) ? strdup (arguments) : NULL;
new_handler->arguments_description = (arguments_description) ? strdup (arguments_description) : NULL;
new_handler->completion_template = (completion_template) ? strdup (completion_template) : NULL;
new_handler->completion_template = (completion_template) ? strdup (completion_template) : strdup ("");
new_handler->interval = 0;
new_handler->remaining = 0;
new_handler->handler = handler_func;