From dd1b2f3cc7e10e072d8bbc592baa3ce18a918602 Mon Sep 17 00:00:00 2001 From: Sascha Kruse Date: Fri, 21 Dec 2012 15:28:53 +0100 Subject: [PATCH] don't add space infront of summary fix github issue #79 --- dunst.c | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/dunst.c b/dunst.c index 5e7c5cd..f7f8fa4 100644 --- a/dunst.c +++ b/dunst.c @@ -571,19 +571,11 @@ void add_notification_to_line_cache(notification *n, int max_width) char *buf; - /* print dup_count */ + /* print dup_count and msg*/ if (n->dup_count > 0) { - sasprintf(&buf, "(%d)", n->dup_count); + sasprintf(&buf, "(%d) %s", n->dup_count, msg); } else { - buf = strdup(""); - } - - /* print msg */ - { - char *new_buf; - sasprintf(&new_buf, "%s %s", buf, msg); - free(buf); - buf = new_buf; + buf = strdup(msg); } /* print age */