summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/plugins/buflist/buflist-bar-item.c6
-rw-r--r--src/plugins/buflist/buflist-command.c4
2 files changed, 9 insertions, 1 deletions
diff --git a/src/plugins/buflist/buflist-bar-item.c b/src/plugins/buflist/buflist-bar-item.c
index b649c7cbb..00cef4356 100644
--- a/src/plugins/buflist/buflist-bar-item.c
+++ b/src/plugins/buflist/buflist-bar-item.c
@@ -276,7 +276,7 @@ buflist_bar_item_buflist_cb (const void *pointer, void *data,
char **buflist, *str_buflist, *condition;
char str_format_number[32], str_format_number_empty[32];
char str_nick_prefix[32], str_color_nick_prefix[32];
- char str_number[32], *line, **hotlist, *str_hotlist;
+ char str_number[32], str_number2[32], *line, **hotlist, *str_hotlist;
char str_hotlist_count[32];
const char *ptr_format, *ptr_format_current, *ptr_format_indent;
const char *ptr_name, *ptr_type, *ptr_nick, *ptr_nick_prefix;
@@ -408,6 +408,8 @@ buflist_bar_item_buflist_cb (const void *pointer, void *data,
weechat_hashtable_set (buflist_hashtable_extra_vars,
"number_displayed", "0");
}
+ snprintf (str_number2, sizeof (str_number2),
+ str_format_number, number);
prev_number = number;
/* buffer merged */
@@ -491,6 +493,8 @@ buflist_bar_item_buflist_cb (const void *pointer, void *data,
weechat_hashtable_set (buflist_hashtable_extra_vars,
"number", str_number);
weechat_hashtable_set (buflist_hashtable_extra_vars,
+ "number2", str_number2);
+ weechat_hashtable_set (buflist_hashtable_extra_vars,
"format_number",
weechat_config_string (
buflist_config_format_number));
diff --git a/src/plugins/buflist/buflist-command.c b/src/plugins/buflist/buflist-command.c
index 203d567fc..2af902442 100644
--- a/src/plugins/buflist/buflist-command.c
+++ b/src/plugins/buflist/buflist-command.c
@@ -112,6 +112,10 @@ buflist_command_init ()
" - ${format_number}: indented number with separator "
"(evaluation of option buflist.format.number)\n"
" - ${number}: indented number, for example \" 1\" if there "
+ "are between 10 and 99 buffers; for merged buffers, this variable "
+ "is set with number for the first buffer and spaces for the next "
+ "buffers with same number\n"
+ " - ${number2}: indented number, for example \" 1\" if there "
"are between 10 and 99 buffers\n"
" - ${number_displayed}: \"1\" if the number is displayed, "
"otherwise \"0\"\n"