Fix hotlist: do not add a buffer if it is displayed by at least one window
This commit is contained in:
parent
c15c536b35
commit
e2a1966095
@ -275,11 +275,15 @@ gui_hotlist_add (struct t_gui_buffer *buffer, int priority,
|
|||||||
if (!buffer || !gui_add_hotlist)
|
if (!buffer || !gui_add_hotlist)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
/* do not highlight current buffer */
|
/* do not add current buffer */
|
||||||
if ((buffer == gui_current_window->buffer)
|
if ((buffer == gui_current_window->buffer)
|
||||||
&& (!allow_current_buffer || (!gui_buffer_is_scrolled (buffer))))
|
&& (!allow_current_buffer || (!gui_buffer_is_scrolled (buffer))))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
/* do not add buffer if it is displayed in a window */
|
||||||
|
if (buffer->num_displayed > 0)
|
||||||
|
return;
|
||||||
|
|
||||||
if (priority < GUI_HOTLIST_MIN)
|
if (priority < GUI_HOTLIST_MIN)
|
||||||
priority = GUI_HOTLIST_MIN;
|
priority = GUI_HOTLIST_MIN;
|
||||||
else if (priority > GUI_HOTLIST_MAX)
|
else if (priority > GUI_HOTLIST_MAX)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user