summaryrefslogtreecommitdiff
path: root/src/plugins/buflist/buflist-bar-item.c
diff options
context:
space:
mode:
authorSébastien Helleu <flashcode@flashtux.org>2023-11-11 21:04:21 +0100
committerSébastien Helleu <flashcode@flashtux.org>2023-11-11 21:04:21 +0100
commit7b86f317643a496bb46322c9045a7e81f4b17ec3 (patch)
tree4218d332c6d9b5a4a20ee57581e29acfc6beec63 /src/plugins/buflist/buflist-bar-item.c
parent5d38149578031b88fc582b3f119bf302137688ce (diff)
downloadweechat-7b86f317643a496bb46322c9045a7e81f4b17ec3.zip
buflist: jump to previous/next buffer displayed in buflist item with ctrl+wheel up/down on a buflist item (closes #1473)
Diffstat (limited to 'src/plugins/buflist/buflist-bar-item.c')
-rw-r--r--src/plugins/buflist/buflist-bar-item.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/plugins/buflist/buflist-bar-item.c b/src/plugins/buflist/buflist-bar-item.c
index e0e12483a..46c115b39 100644
--- a/src/plugins/buflist/buflist-bar-item.c
+++ b/src/plugins/buflist/buflist-bar-item.c
@@ -74,6 +74,9 @@ buflist_bar_item_get_index (const char *item_name)
int i;
const char *ptr_item_name;
+ if (!item_name)
+ return -1;
+
for (i = 0; i < BUFLIST_BAR_NUM_ITEMS; i++)
{
ptr_item_name = buflist_bar_item_get_name (i);