diff options
author | Jesse Duffield <jessedduffield@gmail.com> | 2018-12-08 16:54:54 +1100 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2018-12-11 22:02:12 +1100 |
commit | 9489a9447396b30bca86ea3df201cacfdffdb1a9 (patch) | |
tree | ae251c28096f2bde6b1647603852782c58329d4c /pkg/gui/status_panel.go | |
parent | e0ff46fe53503d74fc63c90fc5ddc4d9468b60d5 (diff) |
Make merge panel its own panel
Diffstat (limited to 'pkg/gui/status_panel.go')
-rw-r--r-- | pkg/gui/status_panel.go | 25 |
1 files changed, 23 insertions, 2 deletions
diff --git a/pkg/gui/status_panel.go b/pkg/gui/status_panel.go index 16017abba..bb0ac773b 100644 --- a/pkg/gui/status_panel.go +++ b/pkg/gui/status_panel.go @@ -48,7 +48,7 @@ func (gui *Gui) handleCheckForUpdate(g *gocui.Gui, v *gocui.View) error { } func (gui *Gui) handleStatusSelect(g *gocui.Gui, v *gocui.View) error { - blue := color.New(color.FgBlue) + magenta := color.New(color.FgMagenta) dashboardString := strings.Join( []string{ @@ -58,7 +58,7 @@ func (gui *Gui) handleStatusSelect(g *gocui.Gui, v *gocui.View) error { "Config Options: https://github.com/jesseduffield/lazygit/blob/master/docs/Config.md", "Tutorial: https://youtu.be/VDXvbHZYeKY", "Raise an Issue: https://github.com/jesseduffield/lazygit/issues", - blue.Sprint("Buy Jesse a coffee: https://donorbox.org/lazygit"), // caffeine ain't free + magenta.Sprint("Buy Jesse a coffee: https://donorbox.org/lazygit"), // caffeine ain't free }, "\n\n") return gui.renderString(g, "main", dashboardString) @@ -84,3 +84,24 @@ func lazygitTitle() string { __/ | __/ | |___/ |___/ ` } + +func (gui *Gui) updateWorkTreeState() error { + merging, err := gui.GitCommand.IsInMergeState() + if err != nil { + return err + } + if merging { + gui.State.WorkingTreeState = "merging" + return nil + } + rebasing, err := gui.GitCommand.IsInRebaseState() + if err != nil { + return err + } + if rebasing { + gui.State.WorkingTreeState = "rebasing" + return nil + } + gui.State.WorkingTreeState = "normal" + return nil +} |