From 03a08e8b4295a2e052e1679c2b43ddc3a6b43ef8 Mon Sep 17 00:00:00 2001 From: bth Date: Thu, 22 Jan 2026 19:29:27 -0800 Subject: [PATCH] tag : include newline in Grow --- tag/print.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tag/print.go b/tag/print.go index 5288258..ab71953 100644 --- a/tag/print.go +++ b/tag/print.go @@ -60,8 +60,8 @@ func printFiles(w io.Writer, entries []Entry, tagmap map[string]Set, files Set, tags := fmt.Sprintln("[tags]") otags := orderedTags(tagmap, query) tsb := strings.Builder{} - // 20 * ' ' + '= 000' = 25 - tsb.Grow(len(otags) * 25) + // 20 * ' ' + '= 000\n' = 26 + tsb.Grow(len(otags) * 26) for _, t := range otags { tsb.WriteString(fmt.Sprintf("%-20s= %d\n", t.name, t.count)) } @@ -70,8 +70,8 @@ func printFiles(w io.Writer, entries []Entry, tagmap map[string]Set, files Set, adj := fmt.Sprintln("[adjacencies]") oadj := orderedTags(adjacencies, Query{WILD, []string{}}) asb := strings.Builder{} - // 20 * ' ' + '= 000 : 000' = 31 - asb.Grow(len(oadj) * 31) + // 20 * ' ' + '= 000 : 000\n' = 32 + asb.Grow(len(oadj) * 32) for _, t := range oadj { // TODO: something's fucky about these len() with --invert : asb.WriteString(fmt.Sprintf("%-20s= %-3d : %d\n", t.name, t.count, len(tagmap[t.name])))