summaryrefslogtreecommitdiff
path: root/src/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/buflist/buflist-bar-item.c3
-rw-r--r--src/plugins/buflist/buflist-config.c12
-rw-r--r--src/plugins/buflist/buflist-config.h1
3 files changed, 15 insertions, 1 deletions
diff --git a/src/plugins/buflist/buflist-bar-item.c b/src/plugins/buflist/buflist-bar-item.c
index d60ecfb45..cf1d22d2a 100644
--- a/src/plugins/buflist/buflist-bar-item.c
+++ b/src/plugins/buflist/buflist-bar-item.c
@@ -324,7 +324,8 @@ buflist_bar_item_buflist_cb (const void *pointer, void *data,
ptr_buffer, "name");
}
- if (*buflist[0])
+ if (weechat_config_boolean (buflist_config_look_add_newline)
+ && *buflist[0])
{
if (!weechat_string_dyn_concat (buflist, "\n"))
goto error;
diff --git a/src/plugins/buflist/buflist-config.c b/src/plugins/buflist/buflist-config.c
index 9c08baa92..2af36236c 100644
--- a/src/plugins/buflist/buflist-config.c
+++ b/src/plugins/buflist/buflist-config.c
@@ -32,6 +32,7 @@ struct t_config_file *buflist_config_file = NULL;
/* buflist config, look section */
+struct t_config_option *buflist_config_look_add_newline;
struct t_config_option *buflist_config_look_auto_scroll;
struct t_config_option *buflist_config_look_display_conditions;
struct t_config_option *buflist_config_look_enabled;
@@ -338,6 +339,17 @@ buflist_config_init ()
return 0;
}
+ buflist_config_look_add_newline = weechat_config_new_option (
+ buflist_config_file, ptr_section,
+ "add_newline", "boolean",
+ N_("add newline between the buffers displayed, so each buffer is "
+ "displayed on a separate line (recommended); if disabled, newlines "
+ "must be manually added in the formats with \"${\\n}\", "
+ "and the mouse actions are not possible any more"),
+ NULL, 0, 0, "on", NULL, 0,
+ NULL, NULL, NULL,
+ &buflist_config_change_buflist, NULL, NULL,
+ NULL, NULL, NULL);
buflist_config_look_auto_scroll = weechat_config_new_option (
buflist_config_file, ptr_section,
"auto_scroll", "integer",
diff --git a/src/plugins/buflist/buflist-config.h b/src/plugins/buflist/buflist-config.h
index 1e4d9b877..f8895873c 100644
--- a/src/plugins/buflist/buflist-config.h
+++ b/src/plugins/buflist/buflist-config.h
@@ -32,6 +32,7 @@
extern struct t_config_file *buflist_config_file;
+extern struct t_config_option *buflist_config_look_add_newline;
extern struct t_config_option *buflist_config_look_auto_scroll;
extern struct t_config_option *buflist_config_look_display_conditions;
extern struct t_config_option *buflist_config_look_enabled;