aboutsummaryrefslogtreecommitdiffstats
path: root/commands/ls.go
diff options
context:
space:
mode:
authorYuri D'Elia <wavexx@thregr.org>2020-07-13 13:14:47 +0200
committerYuri D'Elia <wavexx@thregr.org>2020-07-13 13:14:47 +0200
commit54d4307a2e065ed41f4ee786805e1830fce5e320 (patch)
treeb20f0046e8c1f169630112e43fb594257829651e /commands/ls.go
parentf3304bdc1c215e733b9a2ee6a228e64f663c2b09 (diff)
downloadgit-bug-54d4307a2e065ed41f4ee786805e1830fce5e320.tar.gz
Trim titles in list views
Diffstat (limited to 'commands/ls.go')
-rw-r--r--commands/ls.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/commands/ls.go b/commands/ls.go
index ad61a852..da75b5bc 100644
--- a/commands/ls.go
+++ b/commands/ls.go
@@ -210,7 +210,7 @@ func lsDefaultFormatter(env *Env, bugExcerpts []*cache.BugExcerpt) error {
// truncate + pad if needed
labelsFmt := text.TruncateMax(labelsTxt.String(), 10)
- titleFmt := text.LeftPadMaxLine(b.Title, 50-text.Len(labelsFmt), 0)
+ titleFmt := text.LeftPadMaxLine(strings.TrimSpace(b.Title), 50-text.Len(labelsFmt), 0)
authorFmt := text.LeftPadMaxLine(name, 15, 0)
comments := fmt.Sprintf("%4d 💬", b.LenComments)
@@ -231,7 +231,7 @@ func lsDefaultFormatter(env *Env, bugExcerpts []*cache.BugExcerpt) error {
func lsPlainFormatter(env *Env, bugExcerpts []*cache.BugExcerpt) error {
for _, b := range bugExcerpts {
- env.out.Printf("%s [%s] %s\n", b.Id.Human(), b.Status, b.Title)
+ env.out.Printf("%s [%s] %s\n", b.Id.Human(), b.Status, strings.TrimSpace(b.Title))
}
return nil
}