diff options
author | Jesse Duffield <jessedduffield@gmail.com> | 2018-09-12 18:23:25 +1000 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2018-09-12 18:23:25 +1000 |
commit | f8b484f638e813537b9b968cf65d378b900fbcee (patch) | |
tree | 708fd1b05770b2020b2b16cff165688a9256bc81 /pkg/gui/branches_panel.go | |
parent | 52b132fe01156d8c7654180d03e40726e18692cd (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.go | 4 |
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) }) |