summaryrefslogtreecommitdiff
path: root/src/plugins/buflist/buflist-config.c
diff options
context:
space:
mode:
authorSébastien Helleu <flashcode@flashtux.org>2017-03-29 20:00:36 +0200
committerSébastien Helleu <flashcode@flashtux.org>2017-03-29 20:00:36 +0200
commit0436fff31b5ef7814391dd1a666cccfaa0f2ff67 (patch)
treeb35d434bf752b033a4c277a46af63db70902d77f /src/plugins/buflist/buflist-config.c
parent454a4b14b28a476cf274ed894275e63093a4a053 (diff)
downloadweechat-0436fff31b5ef7814391dd1a666cccfaa0f2ff67.zip
buflist: add option buflist.format.number
Diffstat (limited to 'src/plugins/buflist/buflist-config.c')
-rw-r--r--src/plugins/buflist/buflist-config.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/src/plugins/buflist/buflist-config.c b/src/plugins/buflist/buflist-config.c
index 1c24a6d61..76f7bdf7e 100644
--- a/src/plugins/buflist/buflist-config.c
+++ b/src/plugins/buflist/buflist-config.c
@@ -44,6 +44,7 @@ struct t_config_option *buflist_config_format_hotlist_level[4];
struct t_config_option *buflist_config_format_hotlist_level_none;
struct t_config_option *buflist_config_format_hotlist_separator;
struct t_config_option *buflist_config_format_lag;
+struct t_config_option *buflist_config_format_number;
struct t_hook **buflist_config_signals_refresh = NULL;
int buflist_config_num_signals_refresh = 0;
@@ -264,7 +265,7 @@ buflist_config_init ()
N_("format of each line with a buffer "
"(note: content is evaluated, see /help buflist)"),
NULL, 0, 0,
- "${color:green}${number}.${indent}${color_hotlist}${name}",
+ "${format_number}${indent}${color_hotlist}${name}",
NULL, 0,
NULL, NULL, NULL,
&buflist_config_change_buflist, NULL, NULL,
@@ -275,7 +276,7 @@ buflist_config_init ()
N_("format for the line with current buffer "
"(note: content is evaluated, see /help buflist)"),
NULL, 0, 0,
- "${color:lightgreen,blue}${number}.${indent}${color_hotlist}${name}",
+ "${color:lightgreen,blue}${format_buffer}",
NULL, 0,
NULL, NULL, NULL,
&buflist_config_change_buflist, NULL, NULL,
@@ -368,6 +369,17 @@ buflist_config_init ()
NULL, NULL, NULL,
&buflist_config_change_buflist, NULL, NULL,
NULL, NULL, NULL);
+ buflist_config_format_number = weechat_config_new_option (
+ buflist_config_file, ptr_section,
+ "number", "string",
+ N_("format for buffer number, ${number} is the indented number "
+ "(note: content is evaluated, see /help buflist)"),
+ NULL, 0, 0,
+ "${color:green}${number}${if:${number_displayed}?.: }",
+ NULL, 0,
+ NULL, NULL, NULL,
+ &buflist_config_change_buflist, NULL, NULL,
+ NULL, NULL, NULL);
return 1;
}