From 1a34f871639febe36a326cb1d92b132f672ab685 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Helleu?= Date: Sat, 26 Jan 2019 14:54:57 +0100 Subject: [PATCH] core: do not automatically add a space when completing "nick:" at the beginning of command line The space can be added in option weechat.completion.nick_completer (this is now the default value of the option): /set weechat.completion.nick_completer ": " --- ChangeLog.adoc | 1 + ReleaseNotes.adoc | 14 ++++++++++++++ doc/de/autogen/user/weechat_options.adoc | 2 +- doc/en/autogen/user/weechat_options.adoc | 2 +- doc/fr/autogen/user/weechat_options.adoc | 2 +- doc/it/autogen/user/weechat_options.adoc | 2 +- doc/ja/autogen/user/weechat_options.adoc | 2 +- doc/pl/autogen/user/weechat_options.adoc | 2 +- src/core/wee-config.c | 2 +- src/gui/gui-completion.c | 1 + 10 files changed, 23 insertions(+), 7 deletions(-) diff --git a/ChangeLog.adoc b/ChangeLog.adoc index 2505b4ff9..60940463b 100644 --- a/ChangeLog.adoc +++ b/ChangeLog.adoc @@ -20,6 +20,7 @@ https://weechat.org/files/releasenotes/ReleaseNotes-devel.html[release notes] New features:: + * core: do not automatically add a space when completing "nick:" at the beginning of command line (the space can be added in option weechat.completion.nick_completer) * core: add default keys kbd:[Ctrl+F11]/kbd:[Ctrl+F12] to scroll up/down one page in nicklist (same action as kbd:[F11]/kbd:[F12]) * core: add command line option "-t" (or "--temp-dir") to create a temporary WeeChat home (deleted on exit) * api: add functions string_base_encode and string_base_decode, remove functions string_encode_base64 and string_decode_base64 diff --git a/ReleaseNotes.adoc b/ReleaseNotes.adoc index 9bd026d50..e4fdf9b76 100644 --- a/ReleaseNotes.adoc +++ b/ReleaseNotes.adoc @@ -20,6 +20,20 @@ https://weechat.org/files/changelog/ChangeLog-devel.html[ChangeLog] [[v2.4]] == Version 2.4 (under dev) +[[v2.4_nick_completer]] +=== Nick completer + +A space is not added automatically any more when you complete a nick at the +beginning of command line (expected result is: "nick: "). + +The default value of option weechat.completion.nick_completer has been changed +to add the space by default, so you may have to run this command if you want +the space to be added automatically: + +---- +/set weechat.completion.nick_completer ": " +---- + [[v2.4_api_base64_functions]] === Base64 API functions diff --git a/doc/de/autogen/user/weechat_options.adoc b/doc/de/autogen/user/weechat_options.adoc index 8cf322e31..ac0403492 100644 --- a/doc/de/autogen/user/weechat_options.adoc +++ b/doc/de/autogen/user/weechat_options.adoc @@ -420,7 +420,7 @@ ** Beschreibung: pass:none[fügt eine Zeichenkette hinter die Nick-Vervollständigung ein (sofern ein Nickname das erste Wort in der Kommandozeile ist)] ** Typ: Zeichenkette ** Werte: beliebige Zeichenkette -** Standardwert: `+":"+` +** Standardwert: `+": "+` * [[option_weechat.completion.nick_first_only]] *weechat.completion.nick_first_only* ** Beschreibung: pass:none[es wird ausschließlich mit dem ersten, passendem Nick-Namen vervollständigt] diff --git a/doc/en/autogen/user/weechat_options.adoc b/doc/en/autogen/user/weechat_options.adoc index cb37fefe3..35d8d1df3 100644 --- a/doc/en/autogen/user/weechat_options.adoc +++ b/doc/en/autogen/user/weechat_options.adoc @@ -420,7 +420,7 @@ ** description: pass:none[string inserted after nick completion (when nick is first word on command line)] ** type: string ** values: any string -** default value: `+":"+` +** default value: `+": "+` * [[option_weechat.completion.nick_first_only]] *weechat.completion.nick_first_only* ** description: pass:none[complete only with first nick found] diff --git a/doc/fr/autogen/user/weechat_options.adoc b/doc/fr/autogen/user/weechat_options.adoc index d29e20605..62fb67374 100644 --- a/doc/fr/autogen/user/weechat_options.adoc +++ b/doc/fr/autogen/user/weechat_options.adoc @@ -420,7 +420,7 @@ ** description: pass:none[chaîne insérée après la complétion du pseudo (quand le pseudo est le premier mot sur la ligne de commande)] ** type: chaîne ** valeurs: toute chaîne -** valeur par défaut: `+":"+` +** valeur par défaut: `+": "+` * [[option_weechat.completion.nick_first_only]] *weechat.completion.nick_first_only* ** description: pass:none[compléter seulement avec le premier pseudo trouvé] diff --git a/doc/it/autogen/user/weechat_options.adoc b/doc/it/autogen/user/weechat_options.adoc index 7b4823d31..af88dd4cc 100644 --- a/doc/it/autogen/user/weechat_options.adoc +++ b/doc/it/autogen/user/weechat_options.adoc @@ -420,7 +420,7 @@ ** descrizione: pass:none[stringa inserita dopo il completamento del nick (quando il nick è la prima parola sulla riga di comando)] ** tipo: stringa ** valori: qualsiasi stringa -** valore predefinito: `+":"+` +** valore predefinito: `+": "+` * [[option_weechat.completion.nick_first_only]] *weechat.completion.nick_first_only* ** descrizione: pass:none[completa solo con il primo nick trovato] diff --git a/doc/ja/autogen/user/weechat_options.adoc b/doc/ja/autogen/user/weechat_options.adoc index eb99b3d31..58341b896 100644 --- a/doc/ja/autogen/user/weechat_options.adoc +++ b/doc/ja/autogen/user/weechat_options.adoc @@ -420,7 +420,7 @@ ** 説明: pass:none[ニックネーム補完の後に追加する文字列 (ニックネームがコマンドラインの最初にある場合)] ** タイプ: 文字列 ** 値: 未制約文字列 -** デフォルト値: `+":"+` +** デフォルト値: `+": "+` * [[option_weechat.completion.nick_first_only]] *weechat.completion.nick_first_only* ** 説明: pass:none[最初に見つかったニックネームだけを補完] diff --git a/doc/pl/autogen/user/weechat_options.adoc b/doc/pl/autogen/user/weechat_options.adoc index 5e7968c8f..d9e11cd0e 100644 --- a/doc/pl/autogen/user/weechat_options.adoc +++ b/doc/pl/autogen/user/weechat_options.adoc @@ -420,7 +420,7 @@ ** opis: pass:none[ciąg wstawiany po dopełnionym nicku (kiedy nick jest pierwszym słowem w linii poleceń)] ** typ: ciąg ** wartości: dowolny ciąg -** domyślna wartość: `+":"+` +** domyślna wartość: `+": "+` * [[option_weechat.completion.nick_first_only]] *weechat.completion.nick_first_only* ** opis: pass:none[dopełniaj tylko pierwszym znalezionym nickiem] diff --git a/src/core/wee-config.c b/src/core/wee-config.c index d34440aa5..98a40e727 100644 --- a/src/core/wee-config.c +++ b/src/core/wee-config.c @@ -4175,7 +4175,7 @@ config_weechat_init_options () "nick_completer", "string", N_("string inserted after nick completion (when nick is first word on " "command line)"), - NULL, 0, 0, ":", NULL, 0, + NULL, 0, 0, ": ", NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); config_completion_nick_first_only = config_file_new_option ( weechat_config_file, ptr_section, diff --git a/src/gui/gui-completion.c b/src/gui/gui-completion.c index 5032a502a..3ab0d6e0d 100644 --- a/src/gui/gui-completion.c +++ b/src/gui/gui-completion.c @@ -431,6 +431,7 @@ gui_completion_list_add (struct t_gui_completion *completion, const char *word, CONFIG_STRING(config_completion_nick_completer)); completion_word->word = strdup (buffer); arraylist_insert (completion->list, index, completion_word); + completion->add_space = 0; } else {