diff options
author | Jesse Duffield <jessedduffield@gmail.com> | 2018-08-13 21:16:21 +1000 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2018-08-13 21:16:21 +1000 |
commit | 9e725ae24e8fcecefec35a65b50476d371653ffb (patch) | |
tree | 840df3748f981967a3b9f7c276602832dab360d3 /pkg/gui/status_panel.go | |
parent | 97cff656121270e9c790432e28622d92ab7b0f1a (diff) |
got this bad boy compiling again
Diffstat (limited to 'pkg/gui/status_panel.go')
-rw-r--r-- | pkg/gui/status_panel.go | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/pkg/gui/status_panel.go b/pkg/gui/status_panel.go index 822be2846..67f133738 100644 --- a/pkg/gui/status_panel.go +++ b/pkg/gui/status_panel.go @@ -5,9 +5,10 @@ import ( "github.com/fatih/color" "github.com/jesseduffield/gocui" + "github.com/jesseduffield/lazygit/pkg/utils" ) -func refreshStatus(g *gocui.Gui) error { +func (gui *Gui) refreshStatus(g *gocui.Gui) error { v, err := g.View("status") if err != nil { panic(err) @@ -17,22 +18,22 @@ func refreshStatus(g *gocui.Gui) error { // contents end up cleared g.Update(func(*gocui.Gui) error { v.Clear() - pushables, pullables := git.UpstreamDifferenceCount() + pushables, pullables := gui.GitCommand.UpstreamDifferenceCount() fmt.Fprint(v, "↑"+pushables+"↓"+pullables) - branches := state.Branches - if err := updateHasMergeConflictStatus(); err != nil { + branches := gui.State.Branches + if err := gui.updateHasMergeConflictStatus(); err != nil { return err } - if state.HasMergeConflicts { - fmt.Fprint(v, coloredString(" (merging)", color.FgYellow)) + if gui.State.HasMergeConflicts { + fmt.Fprint(v, utils.ColoredString(" (merging)", color.FgYellow)) } if len(branches) == 0 { return nil } branch := branches[0] - name := coloredString(branch.Name, branch.getColor()) - repo := getCurrentProject() + name := utils.ColoredString(branch.Name, branch.GetColor()) + repo := utils.GetCurrentRepoName() fmt.Fprint(v, " "+repo+" → "+name) return nil }) |