summaryrefslogtreecommitdiff
path: root/src/plugins/buflist
diff options
context:
space:
mode:
authorSébastien Helleu <flashcode@flashtux.org>2023-06-20 19:16:17 +0200
committerSébastien Helleu <flashcode@flashtux.org>2023-07-04 22:03:05 +0200
commitd7a6fcba5f1b88df1dbff994f624cd3754a3945f (patch)
tree3681060f28b8caf6d56c329c610b2f746b713893 /src/plugins/buflist
parentf8116216110504bb5d85ca863189f68617f22188 (diff)
downloadweechat-d7a6fcba5f1b88df1dbff994f624cd3754a3945f.zip
buflist: increase max number of buflist items from 3 to 5 (closes #1703)
Diffstat (limited to 'src/plugins/buflist')
-rw-r--r--src/plugins/buflist/buflist-bar-item.c7
-rw-r--r--src/plugins/buflist/buflist-bar-item.h2
-rw-r--r--src/plugins/buflist/buflist-config.c12
3 files changed, 12 insertions, 9 deletions
diff --git a/src/plugins/buflist/buflist-bar-item.c b/src/plugins/buflist/buflist-bar-item.c
index d7dcc0868..f7cd9bbc7 100644
--- a/src/plugins/buflist/buflist-bar-item.c
+++ b/src/plugins/buflist/buflist-bar-item.c
@@ -30,14 +30,15 @@
struct t_gui_bar_item *buflist_bar_item_buflist[BUFLIST_BAR_NUM_ITEMS] =
-{ NULL, NULL, NULL };
+{ NULL, NULL, NULL, NULL, NULL };
struct t_hashtable *buflist_hashtable_pointers = NULL;
struct t_hashtable *buflist_hashtable_extra_vars = NULL;
struct t_hashtable *buflist_hashtable_options_conditions = NULL;
struct t_arraylist *buflist_list_buffers[BUFLIST_BAR_NUM_ITEMS] =
-{ NULL, NULL, NULL };
+{ NULL, NULL, NULL, NULL, NULL };
-int old_line_number_current_buffer[BUFLIST_BAR_NUM_ITEMS] = { -1, -1, -1 };
+int old_line_number_current_buffer[BUFLIST_BAR_NUM_ITEMS] =
+{ -1, -1, -1, -1, -1 };
/*
diff --git a/src/plugins/buflist/buflist-bar-item.h b/src/plugins/buflist/buflist-bar-item.h
index 043e6393c..e28f76df1 100644
--- a/src/plugins/buflist/buflist-bar-item.h
+++ b/src/plugins/buflist/buflist-bar-item.h
@@ -22,7 +22,7 @@
#define BUFLIST_BAR_ITEM_NAME "buflist"
-#define BUFLIST_BAR_NUM_ITEMS 3
+#define BUFLIST_BAR_NUM_ITEMS 5
struct t_gui_bar_item;
diff --git a/src/plugins/buflist/buflist-config.c b/src/plugins/buflist/buflist-config.c
index ba2691f5d..03471ab14 100644
--- a/src/plugins/buflist/buflist-config.c
+++ b/src/plugins/buflist/buflist-config.c
@@ -70,8 +70,10 @@ struct t_config_option *buflist_config_format_tls_version = NULL;
struct t_hook **buflist_config_signals_refresh = NULL;
int buflist_config_num_signals_refresh = 0;
-char **buflist_config_sort_fields[BUFLIST_BAR_NUM_ITEMS] = { NULL, NULL, NULL };
-int buflist_config_sort_fields_count[BUFLIST_BAR_NUM_ITEMS] = { 0, 0, 0 };
+char **buflist_config_sort_fields[BUFLIST_BAR_NUM_ITEMS] =
+{ NULL, NULL, NULL, NULL, NULL };
+int buflist_config_sort_fields_count[BUFLIST_BAR_NUM_ITEMS] =
+{ 0, 0, 0, 0, 0 };
char *buflist_config_format_buffer_eval = NULL;
char *buflist_config_format_buffer_current_eval = NULL;
char *buflist_config_format_hotlist_eval = NULL;
@@ -622,9 +624,9 @@ buflist_config_init ()
buflist_config_file, buflist_config_section_look,
"use_items", "integer",
N_("number of buflist bar items that can be used; the item names "
- "are: \"buflist\", \"buflist2\", \"buflist3\"; be careful, "
- "using more than one bar item slows down the display of "
- "buffers list"),
+ "are: \"buflist\", \"buflist2\", \"buflist3\", \"buflist4\" and "
+ "\"buflist5\"; be careful, using more than one bar item slows "
+ "down the display of buffers list"),
NULL, 1, BUFLIST_BAR_NUM_ITEMS, "1", NULL, 0,
NULL, NULL, NULL,
&buflist_config_change_use_items, NULL, NULL,