diff options
-rw-r--r-- | doc/en/weechat_plugin_api.en.txt | 2 | ||||
-rw-r--r-- | doc/fr/weechat_plugin_api.fr.txt | 2 | ||||
-rw-r--r-- | doc/it/weechat_plugin_api.it.txt | 2 | ||||
-rw-r--r-- | src/gui/gui-history.c | 8 |
4 files changed, 8 insertions, 6 deletions
diff --git a/doc/en/weechat_plugin_api.en.txt b/doc/en/weechat_plugin_api.en.txt index 41e360403..8243e0d98 100644 --- a/doc/en/weechat_plugin_api.en.txt +++ b/doc/en/weechat_plugin_api.en.txt @@ -6129,7 +6129,7 @@ Arguments: "1" to display bar, "0" to hide it | weechat | history_add | - - | + string with buffer pointer ("0x123..") | input buffer (from user) added to command history (buffer and global) | string added to command history diff --git a/doc/fr/weechat_plugin_api.fr.txt b/doc/fr/weechat_plugin_api.fr.txt index 47cfa379b..c89892185 100644 --- a/doc/fr/weechat_plugin_api.fr.txt +++ b/doc/fr/weechat_plugin_api.fr.txt @@ -6211,7 +6211,7 @@ Paramètres : "1" pour afficher la barre, "0" pour la cacher | weechat | history_add | - - | + chaîne avec un pointeur vers le tampon ("0x123..") | chaîne saisie par l'utilisateur ajoutée à l'historique des commandes (tampon et global) | chaîne ajoutée à l'historique des commandes diff --git a/doc/it/weechat_plugin_api.it.txt b/doc/it/weechat_plugin_api.it.txt index 895524571..08aaf9450 100644 --- a/doc/it/weechat_plugin_api.it.txt +++ b/doc/it/weechat_plugin_api.it.txt @@ -6194,7 +6194,7 @@ Argomenti: "1" per visualizzare la barra, "0" per nasconderla | weechat | history_add | - - | + stringa con puntatore al buffer ("0x123..") | input buffer (from user) added to command history (buffer and global) | string added to command history diff --git a/src/gui/gui-history.c b/src/gui/gui-history.c index 88dcf82ed..dc54dd072 100644 --- a/src/gui/gui-history.c +++ b/src/gui/gui-history.c @@ -142,10 +142,12 @@ gui_history_global_add (const char *string) void gui_history_add (struct t_gui_buffer *buffer, const char *string) { - char *string2; + char *string2, str_buffer[128]; + + snprintf (str_buffer, sizeof (str_buffer), + "0x%lx", (long unsigned int)(buffer)); + string2 = hook_modifier_exec (NULL, "history_add", str_buffer, string); - string2 = hook_modifier_exec (NULL, "history_add", NULL, string); - /* * if message was NOT dropped by modifier, then we add it to buffer and * global history |