1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-25 04:16:38 +02:00

core: fix display of hotlist in buflist after changing value of option weechat.look.hotlist_sort (closes #1733)

The "hotlist" pointer in buffers was lost, it is now set again after switching
to the newly sorted hotlist.
This commit is contained in:
Sébastien Helleu
2021-12-28 13:52:58 +01:00
parent df0506dbdf
commit dd2b19ec42
2 changed files with 11 additions and 1 deletions
+1
View File
@@ -24,6 +24,7 @@ New features::
Bug fixes::
* core: fix display of hotlist in buflist after changing value of option weechat.look.hotlist_sort (issue #1733)
* irc: fix display of IRC numeric messages with no parameters
Tests::
+10 -1
View File
@@ -166,7 +166,7 @@ gui_hotlist_free_all (struct t_gui_hotlist **hotlist,
/* remove all hotlists */
while (*hotlist)
{
gui_hotlist_free (hotlist, last_hotlist, *hotlist, 1);
gui_hotlist_free (hotlist, last_hotlist, *hotlist, 0);
}
}
@@ -504,11 +504,20 @@ gui_hotlist_resort ()
gui_hotlist_add_hotlist (&new_hotlist, &last_new_hotlist, element);
}
/* clear whole hotlist */
gui_hotlist_free_all (&gui_hotlist, &last_gui_hotlist);
/* switch to new sorted hotlist */
gui_hotlist = new_hotlist;
last_gui_hotlist = last_new_hotlist;
/* reassign hotlist in buffers */
for (ptr_hotlist = gui_hotlist; ptr_hotlist;
ptr_hotlist = ptr_hotlist->next_hotlist)
{
ptr_hotlist->buffer->hotlist = ptr_hotlist;
}
gui_hotlist_changed_signal (NULL);
}