]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
doveadm: Fixed hiding titles' tabs with tab formatter (-h -f tab)
authorTimo Sirainen <tss@iki.fi>
Mon, 7 Sep 2015 21:51:30 +0000 (00:51 +0300)
committerTimo Sirainen <tss@iki.fi>
Mon, 7 Sep 2015 21:51:30 +0000 (00:51 +0300)
src/doveadm/doveadm-print-tab.c

index 10c52c8d0dbbd5dfdb754f96b9bcb09760df6352..abc5ef2cf0c79a120c8e90f95f22f4d1a571c261 100644 (file)
@@ -26,10 +26,12 @@ static void doveadm_print_tab_flush_header(void)
 static void
 doveadm_print_tab_header(const struct doveadm_print_header *hdr)
 {
-       if (ctx.header_count++ > 0)
-               printf("\t");
-       if (!doveadm_print_hide_titles)
+       ctx.header_count++;
+       if (!doveadm_print_hide_titles) {
+               if (ctx.header_count > 1)
+                       printf("\t");
                printf("%s", hdr->title);
+       }
 }
 
 static void doveadm_print_tab_print(const char *value)