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:
@@ -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
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user