summaryrefslogtreecommitdiffstats
path: root/pkg/gui
diff options
context:
space:
mode:
authorJesse Duffield <jessedduffield@gmail.com>2019-11-17 10:23:06 +1100
committerJesse Duffield <jessedduffield@gmail.com>2019-11-21 22:07:14 +1100
commit1f3e1720a3a0bd31c0816a94d0b7c5bca1589f96 (patch)
tree5ad5c1f01b31cdf9e4fed9cdc0a4779a2bf442b8 /pkg/gui
parentb7f2d0366b2c9b8ac034e426661db4ea72a7bb14 (diff)
split RemoteBranch out from Branch
Diffstat (limited to 'pkg/gui')
-rw-r--r--pkg/gui/gui.go4
-rw-r--r--pkg/gui/remote_branches_panel.go2
-rw-r--r--pkg/gui/remotes_panel.go1
-rw-r--r--pkg/gui/status_panel.go3
4 files changed, 5 insertions, 5 deletions
diff --git a/pkg/gui/gui.go b/pkg/gui/gui.go
index ffb9e00d3..c08c82817 100644
--- a/pkg/gui/gui.go
+++ b/pkg/gui/gui.go
@@ -165,8 +165,8 @@ type guiState struct {
CommitFiles []*commands.CommitFile
DiffEntries []*commands.Commit
Remotes []*commands.Remote
- RemoteBranches []*commands.Branch // using Branch for now because they're basically the same
- MenuItemCount int // can't store the actual list because it's of interface{} type
+ RemoteBranches []*commands.RemoteBranch
+ MenuItemCount int // can't store the actual list because it's of interface{} type
PreviousView string
Platform commands.Platform
Updating bool
diff --git a/pkg/gui/remote_branches_panel.go b/pkg/gui/remote_branches_panel.go
index 93978bc3c..544e8bf81 100644
--- a/pkg/gui/remote_branches_panel.go
+++ b/pkg/gui/remote_branches_panel.go
@@ -12,7 +12,7 @@ import (
// list panel functions
-func (gui *Gui) getSelectedRemoteBranch() *commands.Branch {
+func (gui *Gui) getSelectedRemoteBranch() *commands.RemoteBranch {
selectedLine := gui.State.Panels.RemoteBranches.SelectedLine
if selectedLine == -1 || len(gui.State.RemoteBranches) == 0 {
return nil
diff --git a/pkg/gui/remotes_panel.go b/pkg/gui/remotes_panel.go
index 38ec8b44b..c63b2f07d 100644
--- a/pkg/gui/remotes_panel.go
+++ b/pkg/gui/remotes_panel.go
@@ -43,7 +43,6 @@ func (gui *Gui) handleRemoteSelect(g *gocui.Gui, v *gocui.View) error {
gui.getMainView().Title = "Remote"
remote := gui.getSelectedRemote()
- gui.focusPoint(0, gui.State.Panels.Menu.SelectedLine, gui.State.MenuItemCount, v)
if err := gui.focusPoint(0, gui.State.Panels.Remotes.SelectedLine, len(gui.State.Remotes), v); err != nil {
return err
}
diff --git a/pkg/gui/status_panel.go b/pkg/gui/status_panel.go
index 6ad1c9d56..c351f24e8 100644
--- a/pkg/gui/status_panel.go
+++ b/pkg/gui/status_panel.go
@@ -6,6 +6,7 @@ import (
"github.com/fatih/color"
"github.com/jesseduffield/gocui"
+ "github.com/jesseduffield/lazygit/pkg/commands"
"github.com/jesseduffield/lazygit/pkg/utils"
)
@@ -34,7 +35,7 @@ func (gui *Gui) refreshStatus(g *gocui.Gui) error {
if len(branches) > 0 {
branch := branches[0]
- name := utils.ColoredString(branch.Name, branch.GetColor())
+ name := utils.ColoredString(branch.Name, commands.GetBranchColor(branch.Name))
repoName := utils.GetCurrentRepoName()
status += fmt.Sprintf(" %s → %s", repoName, name)
}