summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSebastien Helleu <flashcode@flashtux.org>2008-11-03 19:45:59 +0100
committerSebastien Helleu <flashcode@flashtux.org>2008-11-03 19:45:59 +0100
commite2a19660959d17b2ff615f90259dd543388c362a (patch)
treeec33abd4eed68e709cbecc9df358a03fa5d5fb5a /src
parentc15c536b356789e72e08bd1269a784ac6333b5d5 (diff)
downloadweechat-e2a19660959d17b2ff615f90259dd543388c362a.zip
Fix hotlist: do not add a buffer if it is displayed by at least one window
Diffstat (limited to 'src')
-rw-r--r--src/gui/gui-hotlist.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/gui/gui-hotlist.c b/src/gui/gui-hotlist.c
index 494a86008..ebc3f6544 100644
--- a/src/gui/gui-hotlist.c
+++ b/src/gui/gui-hotlist.c
@@ -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)