degesch: append message count in /buffer listing

This commit is contained in:
Přemysl Eric Janouch 2016-03-26 05:15:11 +01:00
parent e646afe5ae
commit 6292114c76
1 changed files with 10 additions and 1 deletions

View File

@ -9835,7 +9835,16 @@ show_buffers_list (struct app_context *ctx)
int i = 1; int i = 1;
LIST_FOR_EACH (struct buffer, iter, ctx->buffers) LIST_FOR_EACH (struct buffer, iter, ctx->buffers)
log_global_indent (ctx, " [#d] #s", i++, iter->name); {
struct str s;
str_init (&s);
int new = iter->new_messages_count - iter->new_unimportant_count;
if (new && iter != ctx->current_buffer)
str_append_printf (&s, " (%d%s)", new, &"!"[!iter->highlighted]);
log_global_indent (ctx,
" [#d] #s#&s", i++, iter->name, str_steal (&s));
}
} }
static void static void