summaryrefslogtreecommitdiffstats
path: root/pkg/gui/branches_panel.go
diff options
context:
space:
mode:
authorJesse Duffield <jessedduffield@gmail.com>2018-09-12 18:23:25 +1000
committerJesse Duffield <jessedduffield@gmail.com>2018-09-12 18:23:25 +1000
commitf8b484f638e813537b9b968cf65d378b900fbcee (patch)
tree708fd1b05770b2020b2b16cff165688a9256bc81 /pkg/gui/branches_panel.go
parent52b132fe01156d8c7654180d03e40726e18692cd (diff)
don't use newlines at the end of panel buffers
Diffstat (limited to 'pkg/gui/branches_panel.go')
-rw-r--r--pkg/gui/branches_panel.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/pkg/gui/branches_panel.go b/pkg/gui/branches_panel.go
index 26c3c5618..d164003e5 100644
--- a/pkg/gui/branches_panel.go
+++ b/pkg/gui/branches_panel.go
@@ -152,9 +152,11 @@ func (gui *Gui) refreshBranches(g *gocui.Gui) error {
}
gui.State.Branches = builder.Build()
v.Clear()
+ displayStrings := []string{}
for _, branch := range gui.State.Branches {
- fmt.Fprintln(v, branch.GetDisplayString())
+ displayStrings = append(displayStrings, branch.GetDisplayString())
}
+ fmt.Fprint(v, strings.Join(displayStrings, "\n"))
gui.resetOrigin(v)
return gui.refreshStatus(g)
})