mirror of
https://github.com/weechat/weechat.git
synced 2026-06-28 22:06:38 +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:
@@ -4,6 +4,8 @@ WeeChat - Wee Enhanced Environment for Chat
|
||||
ChangeLog - 2006-07-27
|
||||
|
||||
Version 0.2.0 (under dev!):
|
||||
* fixed completion for command handlers (now empty completion_template
|
||||
means nick completion, "-" string means no completion at all)
|
||||
* fixed nick alignment problem when look_nickmode is off
|
||||
* added generic function for incoming numeric IRC commands (bug #16611)
|
||||
* fixed crash when doing "/part something" on a server buffer (bug #17201)
|
||||
|
||||
@@ -1935,8 +1935,8 @@ plugin->msg_handler_add (plugin, "KICK", &msg_kick, NULL, NULL);
|
||||
bedeutet "<literal>abc|%w def|%i</literal>", dass das erste Argument "abc" oder ein
|
||||
WeeChat-Kommando sein kann und das zweite Argument "def" oder ein IRC-Kommando.
|
||||
Eine leere Zeichenkette bedeutet, dass WeeChat für jedes Argument einen Nicknamen
|
||||
des gegenwärtigen Channels einsetzt, ein NULL schaltet die Vervollständigung für alle
|
||||
Argumente ab.
|
||||
des gegenwärtigen Channels einsetzt, ein NULL oder "-" schaltet die Vervollständigung
|
||||
für alle Argumente ab.
|
||||
</para>
|
||||
<para>
|
||||
Die folgenden Ersetzungen können verwendet werden:
|
||||
|
||||
@@ -1952,8 +1952,8 @@ plugin->msg_handler_add (plugin, "KICK", &msg_kick, NULL, NULL);
|
||||
which means "abc" or a WeeChat command for first argument,
|
||||
"def" or IRC command for second.
|
||||
An empty string lets WeeChat complete any argument with
|
||||
a nick from current channel, NULL disable completion for
|
||||
all command arguments.
|
||||
a nick from current channel, NULL or "-" disable completion
|
||||
for all command arguments.
|
||||
</para>
|
||||
<para>
|
||||
Following codes can be used:
|
||||
|
||||
@@ -1993,8 +1993,8 @@ plugin->msg_handler_add (plugin, "KICK", &msg_kick, NULL, NULL);
|
||||
paramètre, et "def" ou une commande IRC pour le deuxième.
|
||||
Une chaîne vide indique à WeeChat de compléter tout
|
||||
paramètre avec un pseudo du canal courant, une valeur NULL
|
||||
désactive toute complétion pour tous les paramètres de la
|
||||
commande.
|
||||
ou égale à "-" désactive toute complétion pour tous les
|
||||
paramètres de la commande.
|
||||
</para>
|
||||
<para>
|
||||
Les codes suivants peuvent être utilisés :
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -4,6 +4,8 @@ WeeChat - Wee Enhanced Environment for Chat
|
||||
ChangeLog - 2006-07-27
|
||||
|
||||
Version 0.2.0 (under dev!):
|
||||
* fixed completion for command handlers (now empty completion_template
|
||||
means nick completion, "-" string means no completion at all)
|
||||
* fixed nick alignment problem when look_nickmode is off
|
||||
* added generic function for incoming numeric IRC commands (bug #16611)
|
||||
* fixed crash when doing "/part something" on a server buffer (bug #17201)
|
||||
|
||||
@@ -1935,8 +1935,8 @@ plugin->msg_handler_add (plugin, "KICK", &msg_kick, NULL, NULL);
|
||||
bedeutet "<literal>abc|%w def|%i</literal>", dass das erste Argument "abc" oder ein
|
||||
WeeChat-Kommando sein kann und das zweite Argument "def" oder ein IRC-Kommando.
|
||||
Eine leere Zeichenkette bedeutet, dass WeeChat für jedes Argument einen Nicknamen
|
||||
des gegenwärtigen Channels einsetzt, ein NULL schaltet die Vervollständigung für alle
|
||||
Argumente ab.
|
||||
des gegenwärtigen Channels einsetzt, ein NULL oder "-" schaltet die Vervollständigung
|
||||
für alle Argumente ab.
|
||||
</para>
|
||||
<para>
|
||||
Die folgenden Ersetzungen können verwendet werden:
|
||||
|
||||
@@ -1952,8 +1952,8 @@ plugin->msg_handler_add (plugin, "KICK", &msg_kick, NULL, NULL);
|
||||
which means "abc" or a WeeChat command for first argument,
|
||||
"def" or IRC command for second.
|
||||
An empty string lets WeeChat complete any argument with
|
||||
a nick from current channel, NULL disable completion for
|
||||
all command arguments.
|
||||
a nick from current channel, NULL or "-" disable completion
|
||||
for all command arguments.
|
||||
</para>
|
||||
<para>
|
||||
Following codes can be used:
|
||||
|
||||
@@ -1993,8 +1993,8 @@ plugin->msg_handler_add (plugin, "KICK", &msg_kick, NULL, NULL);
|
||||
paramètre, et "def" ou une commande IRC pour le deuxième.
|
||||
Une chaîne vide indique à WeeChat de compléter tout
|
||||
paramètre avec un pseudo du canal courant, une valeur NULL
|
||||
désactive toute complétion pour tous les paramètres de la
|
||||
commande.
|
||||
ou égale à "-" désactive toute complétion pour tous les
|
||||
paramètres de la commande.
|
||||
</para>
|
||||
<para>
|
||||
Les codes suivants peuvent être utilisés :
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user