diff options
author | Sébastien Helleu <flashcode@flashtux.org> | 2022-07-31 09:58:29 +0200 |
---|---|---|
committer | Sébastien Helleu <flashcode@flashtux.org> | 2022-07-31 09:58:29 +0200 |
commit | e77ea9dc26b1238708c841e395eb3544c0519452 (patch) | |
tree | 0c3d71cffbeece63406cd3bc0a2a4f2cfd453693 /src/plugins/buflist/buflist-bar-item.c | |
parent | 324f0aaa2d22de33de7b356fb13c3e795750f69b (diff) | |
download | weechat-e77ea9dc26b1238708c841e395eb3544c0519452.zip |
buflist: add variable "${hotlist_priority_number}" (integer version of "${hotlist_priority}")
Diffstat (limited to 'src/plugins/buflist/buflist-bar-item.c')
-rw-r--r-- | src/plugins/buflist/buflist-bar-item.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/plugins/buflist/buflist-bar-item.c b/src/plugins/buflist/buflist-bar-item.c index 39aa598d9..82be155aa 100644 --- a/src/plugins/buflist/buflist-bar-item.c +++ b/src/plugins/buflist/buflist-bar-item.c @@ -316,6 +316,7 @@ buflist_bar_item_buflist_cb (const void *pointer, void *data, int item_index, num_buffers, is_channel, is_private; int i, j, length_max_number, current_buffer, number, prev_number, priority; int rc, count, line_number, line_number_current_buffer; + int hotlist_priority_number; /* make C compiler happy */ (void) data; @@ -517,6 +518,7 @@ buflist_bar_item_buflist_cb (const void *pointer, void *data, ptr_hotlist_format = weechat_config_string ( buflist_config_format_hotlist_level_none); ptr_hotlist_priority = hotlist_priority_none; + hotlist_priority_number = -1; if (ptr_hotlist) { priority = weechat_hdata_integer (buflist_hdata_hotlist, @@ -526,12 +528,17 @@ buflist_bar_item_buflist_cb (const void *pointer, void *data, ptr_hotlist_format = weechat_config_string ( buflist_config_format_hotlist_level[priority]); ptr_hotlist_priority = hotlist_priority[priority]; + hotlist_priority_number = priority; } } weechat_hashtable_set (buflist_hashtable_extra_vars, "color_hotlist", ptr_hotlist_format); weechat_hashtable_set (buflist_hashtable_extra_vars, "hotlist_priority", ptr_hotlist_priority); + snprintf (str_number, sizeof (str_number), + "%d", hotlist_priority_number); + weechat_hashtable_set (buflist_hashtable_extra_vars, + "hotlist_priority_number", str_number); str_hotlist = NULL; if (ptr_hotlist) { |