summaryrefslogtreecommitdiffstats
path: root/pkg/gui/branches_panel.go
diff options
context:
space:
mode:
authorDawid Dziurla <dawidd0811@gmail.com>2018-09-03 18:45:52 +0200
committerDawid Dziurla <dawidd0811@gmail.com>2018-09-03 18:45:52 +0200
commit67d99a24ea2686be562e8edfb650da5d90c5a68c (patch)
tree95bd721ecf657815fdee2c01bff375978cd98715 /pkg/gui/branches_panel.go
parentbf8514f5e2fa5182fadbee08f1348b0e5021b3aa (diff)
get selected branch from correct panel
Diffstat (limited to 'pkg/gui/branches_panel.go')
-rw-r--r--pkg/gui/branches_panel.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/pkg/gui/branches_panel.go b/pkg/gui/branches_panel.go
index 61b8f1a2f..b56f189ce 100644
--- a/pkg/gui/branches_panel.go
+++ b/pkg/gui/branches_panel.go
@@ -10,11 +10,11 @@ import (
)
func (gui *Gui) handleBranchPress(g *gocui.Gui, v *gocui.View) error {
- index := gui.getItemPosition(v)
+ index := gui.getItemPosition(gui.getBranchesView(g))
if index == 0 {
return gui.createErrorPanel(g, gui.Tr.SLocalize("AlreadyCheckedOutBranch"))
}
- branch := gui.getSelectedBranch(v)
+ branch := gui.getSelectedBranch(gui.getBranchesView(g))
if err := gui.GitCommand.Checkout(branch.Name, false); err != nil {
gui.createErrorPanel(g, err.Error())
}