From aae36f4641e9e2fd37c4c9d01f4c39e5bd2232f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Helleu?= Date: Mon, 3 Apr 2017 20:46:50 +0200 Subject: [PATCH] buflist: move set of "nick_prefix" in hashtable --- src/plugins/buflist/buflist-bar-item.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/plugins/buflist/buflist-bar-item.c b/src/plugins/buflist/buflist-bar-item.c index 39c6e5129..25b11a5d4 100644 --- a/src/plugins/buflist/buflist-bar-item.c +++ b/src/plugins/buflist/buflist-bar-item.c @@ -171,6 +171,7 @@ buflist_bar_item_buflist_cb (const void *pointer, void *data, snprintf (str_indent_name, sizeof (str_indent_name), " "); /* nick prefix */ + str_nick_prefix[0] = '\0'; if (is_channel && weechat_config_boolean (buflist_config_look_nick_prefix)) { @@ -199,14 +200,9 @@ buflist_bar_item_buflist_cb (const void *pointer, void *data, } } } - weechat_hashtable_set (buflist_hashtable_extra_vars, - "nick_prefix", str_nick_prefix); - } - else - { - weechat_hashtable_set (buflist_hashtable_extra_vars, - "nick_prefix", ""); } + weechat_hashtable_set (buflist_hashtable_extra_vars, + "nick_prefix", str_nick_prefix); /* set extra variables */ weechat_hashtable_set (buflist_hashtable_extra_vars,