summaryrefslogtreecommitdiff
path: root/degesch.c
diff options
context:
space:
mode:
authorPřemysl Janouch <p.janouch@gmail.com>2016-03-26 05:15:11 +0100
committerPřemysl Janouch <p.janouch@gmail.com>2016-03-26 05:15:11 +0100
commit6292114c76c935e424e91e8c19ea104ca4925f6e (patch)
tree918a6b811c395f9875b493375be5aa319b730519 /degesch.c
parente646afe5ae55fa22959828ff9908c46bc8543827 (diff)
downloadxK-6292114c76c935e424e91e8c19ea104ca4925f6e.tar.gz
xK-6292114c76c935e424e91e8c19ea104ca4925f6e.tar.xz
xK-6292114c76c935e424e91e8c19ea104ca4925f6e.zip
degesch: append message count in /buffer listing
Diffstat (limited to 'degesch.c')
-rw-r--r--degesch.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/degesch.c b/degesch.c
index e3fdb7d..87f4680 100644
--- a/degesch.c
+++ b/degesch.c
@@ -9835,7 +9835,16 @@ show_buffers_list (struct app_context *ctx)
int i = 1;
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