aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPřemysl Janouch <p.janouch@gmail.com>2015-04-18 21:50:42 +0200
committerPřemysl Janouch <p.janouch@gmail.com>2015-04-18 21:50:42 +0200
commitda472bc4f60bf1745b9fdcd6aa7bdfe9fc458e9e (patch)
tree8f155a39270959f7148d8f885563cb3674fb62dc
parent14077ff20929d6e0cd05c1087e0be1101eb59798 (diff)
downloadxK-da472bc4f60bf1745b9fdcd6aa7bdfe9fc458e9e.tar.gz
xK-da472bc4f60bf1745b9fdcd6aa7bdfe9fc458e9e.tar.xz
xK-da472bc4f60bf1745b9fdcd6aa7bdfe9fc458e9e.zip
degesch: count unseen messages
-rw-r--r--degesch.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/degesch.c b/degesch.c
index 86ced13..2c64e50 100644
--- a/degesch.c
+++ b/degesch.c
@@ -811,6 +811,11 @@ buffer_send (struct app_context *ctx, struct buffer *buffer,
(buffer == ctx->global_buffer || buffer == ctx->server_buffer))
// TODO: show this in another color or something
buffer_line_display (ctx, line);
+ else
+ {
+ buffer->unseen_messages_count++;
+ refresh_prompt (ctx);
+ }
}
#define buffer_send_status(ctx, buffer, ...) \
@@ -893,6 +898,7 @@ buffer_activate (struct app_context *ctx, struct buffer *buffer)
// Once we've found where we want to start with the backlog, print it
for (; line; line = line->next)
buffer_line_display (ctx, line);
+ buffer->unseen_messages_count = 0;
// The following part shows you why it's not a good idea to use
// GNU Readline for this kind of software. Or for anything else, really.