summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog.adoc1
-rw-r--r--doc/de/autogen/plugin_api/hdata.adoc9
-rw-r--r--doc/en/autogen/plugin_api/hdata.adoc9
-rw-r--r--doc/fr/autogen/plugin_api/hdata.adoc9
-rw-r--r--doc/it/autogen/plugin_api/hdata.adoc9
-rw-r--r--doc/ja/autogen/plugin_api/hdata.adoc9
-rw-r--r--doc/pl/autogen/plugin_api/hdata.adoc9
-rw-r--r--po/cs.po6
-rw-r--r--po/de.po6
-rw-r--r--po/es.po6
-rw-r--r--po/fr.po7
-rw-r--r--po/hu.po6
-rw-r--r--po/it.po6
-rw-r--r--po/ja.po6
-rw-r--r--po/pl.po6
-rw-r--r--po/pt.po6
-rw-r--r--po/pt_BR.po6
-rw-r--r--po/ru.po6
-rw-r--r--po/tr.po5
-rw-r--r--po/weechat.pot5
-rw-r--r--src/gui/gui-completion.c24
-rw-r--r--src/gui/gui-completion.h3
-rw-r--r--src/plugins/plugin-api.c3
23 files changed, 148 insertions, 14 deletions
diff --git a/ChangeLog.adoc b/ChangeLog.adoc
index af1dbd3fa..c9836a574 100644
--- a/ChangeLog.adoc
+++ b/ChangeLog.adoc
@@ -24,6 +24,7 @@ New features::
* core: add command line option "--stdout" in weechat-headless binary to log to stdout rather than ~/.weechat/weechat.log (issue #1475, issue #1477)
* core: reload configuration files on SIGHUP (issue #1476)
* api: add functions completion_new, completion_search and completion_free
+ * api: add hdata "completion_word"
* buflist: add default key kbd:[Alt+Shift+B] to toggle buflist
* buflist: add options enable/disable/toggle in command /buflist
* buflist: evaluate option buflist.look.sort so that sort can be customized for each of the three buflist bar items (issue #1465)
diff --git a/doc/de/autogen/plugin_api/hdata.adoc b/doc/de/autogen/plugin_api/hdata.adoc
index cfb992f04..65429fdc0 100644
--- a/doc/de/autogen/plugin_api/hdata.adoc
+++ b/doc/de/autogen/plugin_api/hdata.adoc
@@ -671,6 +671,15 @@ _next_completion_   (pointer, hdata: "completion") +
| weechat
+| [[hdata_completion_word]]<<hdata_completion_word,completion_word>>
+| structure with word found for a completion
+| -
+| _word_   (string) +
+_nick_completion_   (char) +
+_count_   (integer) +
+
+
+| weechat
| [[hdata_config_file]]<<hdata_config_file,config_file>>
| Konfigurationsdatei
| _config_files_ +
diff --git a/doc/en/autogen/plugin_api/hdata.adoc b/doc/en/autogen/plugin_api/hdata.adoc
index f3b9338e5..7477f63c9 100644
--- a/doc/en/autogen/plugin_api/hdata.adoc
+++ b/doc/en/autogen/plugin_api/hdata.adoc
@@ -671,6 +671,15 @@ _next_completion_   (pointer, hdata: "completion") +
| weechat
+| [[hdata_completion_word]]<<hdata_completion_word,completion_word>>
+| structure with word found for a completion
+| -
+| _word_   (string) +
+_nick_completion_   (char) +
+_count_   (integer) +
+
+
+| weechat
| [[hdata_config_file]]<<hdata_config_file,config_file>>
| config file
| _config_files_ +
diff --git a/doc/fr/autogen/plugin_api/hdata.adoc b/doc/fr/autogen/plugin_api/hdata.adoc
index 38839bff2..8cfa33bac 100644
--- a/doc/fr/autogen/plugin_api/hdata.adoc
+++ b/doc/fr/autogen/plugin_api/hdata.adoc
@@ -671,6 +671,15 @@ _next_completion_   (pointer, hdata: "completion") +
| weechat
+| [[hdata_completion_word]]<<hdata_completion_word,completion_word>>
+| structure avec un mot trouvé pour une complétion
+| -
+| _word_   (string) +
+_nick_completion_   (char) +
+_count_   (integer) +
+
+
+| weechat
| [[hdata_config_file]]<<hdata_config_file,config_file>>
| fichier de configuration
| _config_files_ +
diff --git a/doc/it/autogen/plugin_api/hdata.adoc b/doc/it/autogen/plugin_api/hdata.adoc
index feab3455d..8df7e4ea7 100644
--- a/doc/it/autogen/plugin_api/hdata.adoc
+++ b/doc/it/autogen/plugin_api/hdata.adoc
@@ -671,6 +671,15 @@ _next_completion_   (pointer, hdata: "completion") +
| weechat
+| [[hdata_completion_word]]<<hdata_completion_word,completion_word>>
+| structure with word found for a completion
+| -
+| _word_   (string) +
+_nick_completion_   (char) +
+_count_   (integer) +
+
+
+| weechat
| [[hdata_config_file]]<<hdata_config_file,config_file>>
| file di configurazione
| _config_files_ +
diff --git a/doc/ja/autogen/plugin_api/hdata.adoc b/doc/ja/autogen/plugin_api/hdata.adoc
index 4dce7fd19..049b7a7d1 100644
--- a/doc/ja/autogen/plugin_api/hdata.adoc
+++ b/doc/ja/autogen/plugin_api/hdata.adoc
@@ -671,6 +671,15 @@ _next_completion_   (pointer, hdata: "completion") +
| weechat
+| [[hdata_completion_word]]<<hdata_completion_word,completion_word>>
+| structure with word found for a completion
+| -
+| _word_   (string) +
+_nick_completion_   (char) +
+_count_   (integer) +
+
+
+| weechat
| [[hdata_config_file]]<<hdata_config_file,config_file>>
| 設定ファイル
| _config_files_ +
diff --git a/doc/pl/autogen/plugin_api/hdata.adoc b/doc/pl/autogen/plugin_api/hdata.adoc
index 14dc7f1ca..1f986f1bd 100644
--- a/doc/pl/autogen/plugin_api/hdata.adoc
+++ b/doc/pl/autogen/plugin_api/hdata.adoc
@@ -671,6 +671,15 @@ _next_completion_   (pointer, hdata: "completion") +
| weechat
+| [[hdata_completion_word]]<<hdata_completion_word,completion_word>>
+| structure with word found for a completion
+| -
+| _word_   (string) +
+_nick_completion_   (char) +
+_count_   (integer) +
+
+
+| weechat
| [[hdata_config_file]]<<hdata_config_file,config_file>>
| plik konfiguracyjne
| _config_files_ +
diff --git a/po/cs.po b/po/cs.po
index f5520cc8f..e709f6378 100644
--- a/po/cs.po
+++ b/po/cs.po
@@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2020-04-26 09:14+0200\n"
+"POT-Creation-Date: 2020-04-27 22:15+0200\n"
"PO-Revision-Date: 2020-04-18 11:34+0200\n"
"Last-Translator: Ondřej Súkup <mimi.vx@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -10079,6 +10079,10 @@ msgstr "navštívený buffer"
msgid "structure with completion"
msgstr "struktura s dokončením"
+#, fuzzy
+msgid "structure with word found for a completion"
+msgstr "struktura s dokončením"
+
msgid "config file"
msgstr "konfigurační soubor"
diff --git a/po/de.po b/po/de.po
index 7506b3012..1964346e5 100644
--- a/po/de.po
+++ b/po/de.po
@@ -24,7 +24,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2020-04-26 09:14+0200\n"
+"POT-Creation-Date: 2020-04-27 22:15+0200\n"
"PO-Revision-Date: 2020-04-19 12:01+0200\n"
"Last-Translator: Nils Görs <weechatter@arcor.de>\n"
"Language-Team: German <kde-i18n-de@kde.org>\n"
@@ -11961,6 +11961,10 @@ msgstr "besuchte Buffer"
msgid "structure with completion"
msgstr "Struktur mit Vervollständigung"
+#, fuzzy
+msgid "structure with word found for a completion"
+msgstr "Struktur mit Vervollständigung"
+
msgid "config file"
msgstr "Konfigurationsdatei"
diff --git a/po/es.po b/po/es.po
index 52724a89d..625b6fc8f 100644
--- a/po/es.po
+++ b/po/es.po
@@ -22,7 +22,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2020-04-26 09:14+0200\n"
+"POT-Creation-Date: 2020-04-27 22:15+0200\n"
"PO-Revision-Date: 2020-04-18 11:34+0200\n"
"Last-Translator: Elián Hanisch <lambdae2@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -10394,6 +10394,10 @@ msgstr "lista de buffers"
msgid "structure with completion"
msgstr "estructura con auto-completador"
+#, fuzzy
+msgid "structure with word found for a completion"
+msgstr "estructura con auto-completador"
+
msgid "config file"
msgstr "archivo de configuración"
diff --git a/po/fr.po b/po/fr.po
index 140bf8aef..8c60df47f 100644
--- a/po/fr.po
+++ b/po/fr.po
@@ -21,8 +21,8 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2020-04-26 09:14+0200\n"
-"PO-Revision-Date: 2020-04-26 09:15+0200\n"
+"POT-Creation-Date: 2020-04-27 22:15+0200\n"
+"PO-Revision-Date: 2020-04-27 22:16+0200\n"
"Last-Translator: Sébastien Helleu <flashcode@flashtux.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
"Language: fr\n"
@@ -11690,6 +11690,9 @@ msgstr "tampon visité"
msgid "structure with completion"
msgstr "structure avec une complétion"
+msgid "structure with word found for a completion"
+msgstr "structure avec un mot trouvé pour une complétion"
+
msgid "config file"
msgstr "fichier de configuration"
diff --git a/po/hu.po b/po/hu.po
index 8c7309030..00e5d53c3 100644
--- a/po/hu.po
+++ b/po/hu.po
@@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2020-04-26 09:14+0200\n"
+"POT-Creation-Date: 2020-04-27 22:15+0200\n"
"PO-Revision-Date: 2020-04-18 11:34+0200\n"
"Last-Translator: Andras Voroskoi <voroskoi@frugalware.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -9421,6 +9421,10 @@ msgid "structure with completion"
msgstr "szöveg beillesztése a parancssorba"
#, fuzzy
+msgid "structure with word found for a completion"
+msgstr "szöveg beillesztése a parancssorba"
+
+#, fuzzy
msgid "config file"
msgstr "szerver konfigurációs fájljának újraolvastatása"
diff --git a/po/it.po b/po/it.po
index 01a55a714..d84ec8129 100644
--- a/po/it.po
+++ b/po/it.po
@@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2020-04-26 09:14+0200\n"
+"POT-Creation-Date: 2020-04-27 22:15+0200\n"
"PO-Revision-Date: 2020-04-18 11:34+0200\n"
"Last-Translator: Esteban I. Ruiz Moreno <exio4.com@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -10580,6 +10580,10 @@ msgstr "elenco dei buffer"
msgid "structure with completion"
msgstr "struttura con completamento"
+#, fuzzy
+msgid "structure with word found for a completion"
+msgstr "struttura con completamento"
+
msgid "config file"
msgstr "file di configurazione"
diff --git a/po/ja.po b/po/ja.po
index c5cabc630..77cdec463 100644
--- a/po/ja.po
+++ b/po/ja.po
@@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2020-04-26 09:14+0200\n"
+"POT-Creation-Date: 2020-04-27 22:15+0200\n"
"PO-Revision-Date: 2020-04-18 11:34+0200\n"
"Last-Translator: AYANOKOUZI, Ryuunosuke <i38w7i3@yahoo.co.jp>\n"
"Language-Team: Japanese <https://github.com/l/weechat/tree/master/"
@@ -11211,6 +11211,10 @@ msgstr "訪問済みバッファ"
msgid "structure with completion"
msgstr "補完する構造"
+#, fuzzy
+msgid "structure with word found for a completion"
+msgstr "補完する構造"
+
msgid "config file"
msgstr "設定ファイル"
diff --git a/po/pl.po b/po/pl.po
index 5a2c4d4fb..5c4a9822f 100644
--- a/po/pl.po
+++ b/po/pl.po
@@ -22,7 +22,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2020-04-26 09:14+0200\n"
+"POT-Creation-Date: 2020-04-27 22:15+0200\n"
"PO-Revision-Date: 2020-04-18 11:34+0200\n"
"Last-Translator: Krzysztof Korościk <soltys@soltys.info>\n"
"Language-Team: Polish <kde-i18n-doc@kde.org>\n"
@@ -11423,6 +11423,10 @@ msgstr "odwiedzony bufor"
msgid "structure with completion"
msgstr "struktura z uzupełnianiem"
+#, fuzzy
+msgid "structure with word found for a completion"
+msgstr "struktura z uzupełnianiem"
+
msgid "config file"
msgstr "plik konfiguracyjne"
diff --git a/po/pt.po b/po/pt.po
index e8ff781de..12e04e7d9 100644
--- a/po/pt.po
+++ b/po/pt.po
@@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2020-04-26 09:14+0200\n"
+"POT-Creation-Date: 2020-04-27 22:15+0200\n"
"PO-Revision-Date: 2020-04-18 11:34+0200\n"
"Last-Translator: Vasco Almeida <vascomalmeida@sapo.pt>\n"
"Language-Team: Portuguese <>\n"
@@ -11042,6 +11042,10 @@ msgstr "buffer visitado"
msgid "structure with completion"
msgstr "estrutura com completação"
+#, fuzzy
+msgid "structure with word found for a completion"
+msgstr "estrutura com completação"
+
msgid "config file"
msgstr "ficheiro de configuração"
diff --git a/po/pt_BR.po b/po/pt_BR.po
index 4dd85de5a..0fea1ef5b 100644
--- a/po/pt_BR.po
+++ b/po/pt_BR.po
@@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2020-04-26 09:14+0200\n"
+"POT-Creation-Date: 2020-04-27 22:15+0200\n"
"PO-Revision-Date: 2020-04-18 11:34+0200\n"
"Last-Translator: Eduardo Elias <camponez@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -9881,6 +9881,10 @@ msgstr "lista de buffers"
msgid "structure with completion"
msgstr "estrutura com completação"
+#, fuzzy
+msgid "structure with word found for a completion"
+msgstr "estrutura com completação"
+
msgid "config file"
msgstr "arquivo de configuração"
diff --git a/po/ru.po b/po/ru.po
index 06aa91dcf..72ca02b8b 100644
--- a/po/ru.po
+++ b/po/ru.po
@@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2020-04-26 09:14+0200\n"
+"POT-Creation-Date: 2020-04-27 22:15+0200\n"
"PO-Revision-Date: 2020-04-18 11:34+0200\n"
"Last-Translator: Aleksey V Zapparov AKA ixti <ixti@member.fsf.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -9457,6 +9457,10 @@ msgid "structure with completion"
msgstr "вставить строку в поле ввода"
#, fuzzy
+msgid "structure with word found for a completion"
+msgstr "вставить строку в поле ввода"
+
+#, fuzzy
msgid "config file"
msgstr "перезагрузить конфигурационный файл сервера"
diff --git a/po/tr.po b/po/tr.po
index 1768ac238..aa0398624 100644
--- a/po/tr.po
+++ b/po/tr.po
@@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2020-04-26 09:14+0200\n"
+"POT-Creation-Date: 2020-04-27 22:15+0200\n"
"PO-Revision-Date: 2019-11-03 08:38+0100\n"
"Last-Translator: Hasan Kiran <sunder67@hotmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -8609,6 +8609,9 @@ msgstr ""
msgid "structure with completion"
msgstr ""
+msgid "structure with word found for a completion"
+msgstr ""
+
msgid "config file"
msgstr ""
diff --git a/po/weechat.pot b/po/weechat.pot
index 7e9141ffa..8160556b0 100644
--- a/po/weechat.pot
+++ b/po/weechat.pot
@@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2020-04-26 09:14+0200\n"
+"POT-Creation-Date: 2020-04-27 22:15+0200\n"
"PO-Revision-Date: 2014-08-16 10:27+0200\n"
"Last-Translator: Sébastien Helleu <flashcode@flashtux.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -8470,6 +8470,9 @@ msgstr ""
msgid "structure with completion"
msgstr ""
+msgid "structure with word found for a completion"
+msgstr ""
+
msgid "config file"
msgstr ""
diff --git a/src/gui/gui-completion.c b/src/gui/gui-completion.c
index 615785eea..c36ab940a 100644
--- a/src/gui/gui-completion.c
+++ b/src/gui/gui-completion.c
@@ -1510,6 +1510,30 @@ gui_completion_hdata_completion_cb (const void *pointer, void *data,
}
/*
+ * Returns hdata for completion word.
+ */
+
+struct t_hdata *
+gui_completion_hdata_completion_word_cb (const void *pointer, void *data,
+ const char *hdata_name)
+{
+ struct t_hdata *hdata;
+
+ /* make C compiler happy */
+ (void) pointer;
+ (void) data;
+
+ hdata = hdata_new (NULL, hdata_name, NULL, NULL, 0, 0, NULL, NULL);
+ if (hdata)
+ {
+ HDATA_VAR(struct t_gui_completion_word, word, STRING, 0, NULL, NULL);
+ HDATA_VAR(struct t_gui_completion_word, nick_completion, CHAR, 0, NULL, NULL);
+ HDATA_VAR(struct t_gui_completion_word, count, INTEGER, 0, NULL, NULL);
+ }
+ return hdata;
+}
+
+/*
* Prints list of completion words in WeeChat log file (usually for crash dump).
*/
diff --git a/src/gui/gui-completion.h b/src/gui/gui-completion.h
index 6f5d85ae0..8056d1bf8 100644
--- a/src/gui/gui-completion.h
+++ b/src/gui/gui-completion.h
@@ -96,6 +96,9 @@ extern const char *gui_completion_get_string (struct t_gui_completion *completio
extern struct t_hdata *gui_completion_hdata_completion_cb (const void *pointer,
void *data,
const char *hdata_name);
+extern struct t_hdata *gui_completion_hdata_completion_word_cb (const void *pointer,
+ void *data,
+ const char *hdata_name);
extern void gui_completion_print_log ();
#endif /* WEECHAT_GUI_COMPLETION_H */
diff --git a/src/plugins/plugin-api.c b/src/plugins/plugin-api.c
index 0d862e251..d4cd2fca6 100644
--- a/src/plugins/plugin-api.c
+++ b/src/plugins/plugin-api.c
@@ -649,6 +649,9 @@ plugin_api_init ()
&gui_buffer_hdata_buffer_visited_cb, NULL, NULL);
hook_hdata (NULL, "completion", N_("structure with completion"),
&gui_completion_hdata_completion_cb, NULL, NULL);
+ hook_hdata (NULL, "completion_word",
+ N_("structure with word found for a completion"),
+ &gui_completion_hdata_completion_word_cb, NULL, NULL);
hook_hdata (NULL, "config_file", N_("config file"),
&config_file_hdata_config_file_cb, NULL, NULL);
hook_hdata (NULL, "config_section", N_("config section"),