summaryrefslogtreecommitdiff
path: root/xC.c
diff options
context:
space:
mode:
Diffstat (limited to 'xC.c')
-rw-r--r--xC.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/xC.c b/xC.c
index b7aa712..1a30f85 100644
--- a/xC.c
+++ b/xC.c
@@ -3068,6 +3068,11 @@ relay_prepare_buffer_update (struct app_context *ctx, struct buffer *buffer)
struct relay_event_data_buffer_update *e = &m->data.buffer_update;
e->event = RELAY_EVENT_BUFFER_UPDATE;
e->buffer_name = str_from_cstr (buffer->name);
+ e->new_messages = MIN (UINT32_MAX,
+ buffer->new_messages_count - buffer->new_unimportant_count);
+ e->new_unimportant_messages = MIN (UINT32_MAX,
+ buffer->new_unimportant_count);
+ e->highlighted = buffer->highlighted;
}
static void
@@ -5015,8 +5020,16 @@ buffer_merge (struct app_context *ctx,
buffer->lines_count += n;
// And since there is no log_*() call, send them to relays manually
+ buffer->highlighted |= merged->highlighted;
LIST_FOR_EACH (struct buffer_line, line, start)
{
+ if (buffer->new_messages_count)
+ {
+ buffer->new_messages_count++;
+ if (line->flags & BUFFER_LINE_UNIMPORTANT)
+ buffer->new_unimportant_count++;
+ }
+
relay_prepare_buffer_line (ctx, buffer, line, false);
relay_broadcast (ctx);
}