diff options
author | Sebastien Helleu <flashcode@flashtux.org> | 2008-09-30 15:39:25 +0200 |
---|---|---|
committer | Sebastien Helleu <flashcode@flashtux.org> | 2008-09-30 15:39:25 +0200 |
commit | 12421a67da6c80c1b1cbdbf9241d18263673bdb2 (patch) | |
tree | 59971f3e6f0df7710306d64d9f07610e2fb8d17d /src/gui/gui-buffer.c | |
parent | 9fa560300ff99bb6f57a0b8350da83d34cd60711 (diff) | |
download | weechat-12421a67da6c80c1b1cbdbf9241d18263673bdb2.zip |
Set unread marker for IRC server/channels/pv buffers when using /away command
Diffstat (limited to 'src/gui/gui-buffer.c')
-rw-r--r-- | src/gui/gui-buffer.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/gui/gui-buffer.c b/src/gui/gui-buffer.c index 1f1cccfb4..7f4a1ec15 100644 --- a/src/gui/gui-buffer.c +++ b/src/gui/gui-buffer.c @@ -506,6 +506,17 @@ gui_buffer_set_highlight_tags (struct t_gui_buffer *buffer, } /* + * gui_buffer_set_unread: set unread marker for a buffer + */ + +void +gui_buffer_set_unread (struct t_gui_buffer *buffer) +{ + if (buffer->type == GUI_BUFFER_TYPE_FORMATED) + buffer->last_read_line = buffer->last_line; +} + +/* * gui_buffer_set: set a buffer property */ @@ -537,6 +548,10 @@ gui_buffer_set (struct t_gui_buffer *buffer, const char *property, gui_hotlist_add (buffer, number, NULL, 1); } } + else if (string_strcasecmp (property, "unread") == 0) + { + gui_buffer_set_unread (buffer); + } if (!buffer) return; |