diff --git a/ChangeLog.adoc b/ChangeLog.adoc index 006d5bda1..486f59196 100644 --- a/ChangeLog.adoc +++ b/ChangeLog.adoc @@ -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:: diff --git a/src/gui/gui-hotlist.c b/src/gui/gui-hotlist.c index 2de62215c..5aee49333 100644 --- a/src/gui/gui-hotlist.c +++ b/src/gui/gui-hotlist.c @@ -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); }