summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
authorSébastien Helleu <flashcode@flashtux.org>2024-03-16 14:43:53 +0100
committerSébastien Helleu <flashcode@flashtux.org>2024-03-16 14:43:53 +0100
commit8eafc0624c60b7d5821be3c419e3c0a7c5dca629 (patch)
treeacc86caa16914491ce1a06aea1b123522e77eeed /src/gui
parent29b502a06a1cbf1d27d4c6a87a29a5822c09fb23 (diff)
downloadweechat-8eafc0624c60b7d5821be3c419e3c0a7c5dca629.zip
core: resort hotlist on any buffer signal (issue #2097)
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/gui-bar-item.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/gui/gui-bar-item.c b/src/gui/gui-bar-item.c
index 363a2b71e..d5e4a8556 100644
--- a/src/gui/gui-bar-item.c
+++ b/src/gui/gui-bar-item.c
@@ -2258,13 +2258,21 @@ gui_bar_item_signal_cb (const void *pointer, void *data,
const char *signal,
const char *type_data, void *signal_data)
{
+ const char *item;
+
/* make C compiler happy */
(void) data;
(void) signal;
(void) type_data;
(void) signal_data;
- gui_bar_item_update ((char *)pointer);
+ item = (const char *)pointer;
+ if (item)
+ {
+ if (strcmp (item, "hotlist") == 0)
+ gui_hotlist_resort ();
+ gui_bar_item_update (item);
+ }
return WEECHAT_RC_OK;
}
@@ -2437,7 +2445,7 @@ gui_bar_item_init ()
gui_bar_item_new (NULL,
gui_bar_item_names[GUI_BAR_ITEM_HOTLIST],
&gui_bar_item_hotlist_cb, NULL, NULL);
- gui_bar_item_hook_signal ("hotlist_changed;buffer_moved;buffer_closed",
+ gui_bar_item_hook_signal ("hotlist_changed;buffer_*",
gui_bar_item_names[GUI_BAR_ITEM_HOTLIST]);
/* completion (possible words when a partial completion occurs) */