From da472bc4f60bf1745b9fdcd6aa7bdfe9fc458e9e Mon Sep 17 00:00:00 2001 From: Přemysl Janouch Date: Sat, 18 Apr 2015 21:50:42 +0200 Subject: degesch: count unseen messages --- degesch.c | 6 ++++++ 1 file changed, 6 insertions(+) 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. -- cgit v1.2.3-70-g09d2