Fix hotlist: do not add a buffer if it is displayed by at least one window

This commit is contained in:
Sebastien Helleu 2008-11-03 19:45:59 +01:00
parent c15c536b35
commit e2a1966095

View File

@ -275,11 +275,15 @@ gui_hotlist_add (struct t_gui_buffer *buffer, int priority,
if (!buffer || !gui_add_hotlist)
return;
/* do not highlight current buffer */
/* do not add current buffer */
if ((buffer == gui_current_window->buffer)
&& (!allow_current_buffer || (!gui_buffer_is_scrolled (buffer))))
return;
/* do not add buffer if it is displayed in a window */
if (buffer->num_displayed > 0)
return;
if (priority < GUI_HOTLIST_MIN)
priority = GUI_HOTLIST_MIN;
else if (priority > GUI_HOTLIST_MAX)