diff --git a/doc/de/autogen/weechat_options.xml b/doc/de/autogen/weechat_options.xml index e9cf2b6f1..ead661fea 100644 --- a/doc/de/autogen/weechat_options.xml +++ b/doc/de/autogen/weechat_options.xml @@ -576,6 +576,16 @@ +weechat.completion.nick_add_space: add space after nick completion (when nick is not first word on command line) + + + type: boolean + + + values: on, off (default value: on) + + + weechat.completion.nick_completor: string inserted after nick completion diff --git a/doc/en/autogen/weechat_options.xml b/doc/en/autogen/weechat_options.xml index d4461a48d..0015063b2 100644 --- a/doc/en/autogen/weechat_options.xml +++ b/doc/en/autogen/weechat_options.xml @@ -576,6 +576,16 @@ +weechat.completion.nick_add_space: add space after nick completion (when nick is not first word on command line) + + + type: boolean + + + values: on, off (default value: on) + + + weechat.completion.nick_completor: string inserted after nick completion diff --git a/doc/fr/autogen/weechat_options.xml b/doc/fr/autogen/weechat_options.xml index 364ae3c18..89ecdfebd 100644 --- a/doc/fr/autogen/weechat_options.xml +++ b/doc/fr/autogen/weechat_options.xml @@ -576,6 +576,16 @@ +weechat.completion.nick_add_space: ajouter un espace après la complétion du pseudo (quand le pseudo n'est pas le premier mot sur la ligne de commande) + + + type: booléen + + + valeurs: on, off (valeur par défaut: on) + + + weechat.completion.nick_completor: chaîne affichée après la complétion des pseudos diff --git a/po/cs.po b/po/cs.po index 54c87c334..2c7a3940a 100644 --- a/po/cs.po +++ b/po/cs.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.2.7-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2009-04-03 15:08+0200\n" +"POT-Creation-Date: 2009-04-03 17:50+0200\n" "PO-Revision-Date: 2009-01-03 00:42+0100\n" "Last-Translator: Jiri Golembiovsky \n" "Language-Team: weechat-dev \n" @@ -1624,6 +1624,10 @@ msgid "" "values)" msgstr "" +msgid "" +"add space after nick completion (when nick is not first word on command line)" +msgstr "" + #, fuzzy msgid "string inserted after nick completion" msgstr "řetězec vložený za doplňování přezdívky" diff --git a/po/de.po b/po/de.po index 0732a5a07..0c339f86f 100644 --- a/po/de.po +++ b/po/de.po @@ -9,7 +9,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.2.7-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2009-04-03 15:08+0200\n" +"POT-Creation-Date: 2009-04-03 17:50+0200\n" "PO-Revision-Date: 2009-01-03 00:42+0100\n" "Last-Translator: Thomas Schuetz \n" "Language-Team: weechat-dev \n" @@ -1650,6 +1650,10 @@ msgid "" "values)" msgstr "" +msgid "" +"add space after nick completion (when nick is not first word on command line)" +msgstr "" + #, fuzzy msgid "string inserted after nick completion" msgstr "Nach Nickvervollständigung anzufügende Zeichenfolge" diff --git a/po/es.po b/po/es.po index 0a13abc19..035c4f2b1 100644 --- a/po/es.po +++ b/po/es.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.2.7-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2009-04-03 15:08+0200\n" +"POT-Creation-Date: 2009-04-03 17:50+0200\n" "PO-Revision-Date: 2009-01-03 00:42+0100\n" "Last-Translator: Roberto González Cardenete \n" "Language-Team: weechat-dev \n" @@ -1631,6 +1631,10 @@ msgid "" "values)" msgstr "" +msgid "" +"add space after nick completion (when nick is not first word on command line)" +msgstr "" + #, fuzzy msgid "string inserted after nick completion" msgstr "la cadena mostrada tras la finalización de los nombres de usuario" diff --git a/po/fr.po b/po/fr.po index 758cb56e1..5464f6b35 100644 --- a/po/fr.po +++ b/po/fr.po @@ -6,8 +6,8 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.2.7-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2009-04-03 15:08+0200\n" -"PO-Revision-Date: 2009-04-03 15:08+0200\n" +"POT-Creation-Date: 2009-04-03 17:50+0200\n" +"PO-Revision-Date: 2009-04-03 17:50+0200\n" "Last-Translator: FlashCode \n" "Language-Team: weechat-dev \n" "MIME-Version: 1.0\n" @@ -1718,6 +1718,12 @@ msgstr "" "modèle de complétion par défaut (merci de consulter la documentation pour " "les codes et valeurs du modèle)" +msgid "" +"add space after nick completion (when nick is not first word on command line)" +msgstr "" +"ajouter un espace après la complétion du pseudo (quand le pseudo n'est pas " +"le premier mot sur la ligne de commande)" + msgid "string inserted after nick completion" msgstr "chaîne affichée après la complétion des pseudos" diff --git a/po/hu.po b/po/hu.po index e7bfebd06..a804db56d 100644 --- a/po/hu.po +++ b/po/hu.po @@ -12,7 +12,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.2.7-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2009-04-03 15:08+0200\n" +"POT-Creation-Date: 2009-04-03 17:50+0200\n" "PO-Revision-Date: 2009-01-03 00:42+0100\n" "Last-Translator: Andras Voroskoi \n" "Language-Team: weechat-dev \n" @@ -1659,6 +1659,10 @@ msgid "" "values)" msgstr "" +msgid "" +"add space after nick completion (when nick is not first word on command line)" +msgstr "" + #, fuzzy msgid "string inserted after nick completion" msgstr "névkiegészítés után beszúrt szöveg" diff --git a/po/ru.po b/po/ru.po index b3c1c3ccd..a604cefa4 100644 --- a/po/ru.po +++ b/po/ru.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.2.7-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2009-04-03 15:08+0200\n" +"POT-Creation-Date: 2009-04-03 17:50+0200\n" "PO-Revision-Date: 2009-01-03 00:42+0100\n" "Last-Translator: Pavel Shevchuk \n" "Language-Team: weechat-dev \n" @@ -1662,6 +1662,10 @@ msgid "" "values)" msgstr "" +msgid "" +"add space after nick completion (when nick is not first word on command line)" +msgstr "" + #, fuzzy msgid "string inserted after nick completion" msgstr "строка, вставляемая после автодополнения ника" diff --git a/po/weechat.pot b/po/weechat.pot index b9f9fa75d..a13eb72be 100644 --- a/po/weechat.pot +++ b/po/weechat.pot @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2009-04-03 15:08+0200\n" +"POT-Creation-Date: 2009-04-03 17:50+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -1390,6 +1390,10 @@ msgid "" "values)" msgstr "" +msgid "" +"add space after nick completion (when nick is not first word on command line)" +msgstr "" + msgid "string inserted after nick completion" msgstr "" diff --git a/src/core/wee-config.c b/src/core/wee-config.c index 239c26167..38c549663 100644 --- a/src/core/wee-config.c +++ b/src/core/wee-config.c @@ -145,6 +145,7 @@ struct t_config_option *config_color_nicklist_separator; /* config, completion section */ struct t_config_option *config_completion_default_template; +struct t_config_option *config_completion_nick_add_space; struct t_config_option *config_completion_nick_completor; struct t_config_option *config_completion_nick_first_only; struct t_config_option *config_completion_nick_ignore_chars; @@ -1605,6 +1606,12 @@ config_weechat_init_options () "codes and values)"), NULL, 0, 0, "%n|%(irc_channels)", NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL); + config_completion_nick_add_space = config_file_new_option ( + weechat_config_file, ptr_section, + "nick_add_space", "boolean", + N_("add space after nick completion (when nick is not first word on " + "command line)"), + NULL, 0, 0, "on", NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL); config_completion_nick_completor = config_file_new_option ( weechat_config_file, ptr_section, "nick_completor", "string", diff --git a/src/core/wee-config.h b/src/core/wee-config.h index 1ef819e14..f8754ae2e 100644 --- a/src/core/wee-config.h +++ b/src/core/wee-config.h @@ -147,6 +147,7 @@ extern struct t_config_option *config_color_nicklist_more; extern struct t_config_option *config_color_nicklist_separator; extern struct t_config_option *config_completion_default_template; +extern struct t_config_option *config_completion_nick_add_space; extern struct t_config_option *config_completion_nick_completor; extern struct t_config_option *config_completion_nick_first_only; extern struct t_config_option *config_completion_nick_ignore_chars; diff --git a/src/gui/gui-completion.c b/src/gui/gui-completion.c index a1ec06246..482c55fd2 100644 --- a/src/gui/gui-completion.c +++ b/src/gui/gui-completion.c @@ -1501,6 +1501,11 @@ gui_completion_complete (struct t_gui_completion *completion) free (completion->word_found); completion->word_found = strdup (ptr_item->data); completion->word_found_is_nick = item_is_nick; + if (item_is_nick && (completion->base_word_pos > 0) + && !CONFIG_BOOLEAN(config_completion_nick_add_space)) + { + completion->add_space = 0; + } /* stop after first nick if user asked that */ if (item_is_nick