1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-06-27 00:51:18 +02:00

appease golangci

This commit is contained in:
Jesse Duffield
2019-03-02 13:22:02 +11:00
parent 4de31da4be
commit 1337f6e76a
6 changed files with 32 additions and 13 deletions

View File

@ -22,6 +22,13 @@ func (gui *Gui) getSelectedBranch() *commands.Branch {
// may want to standardise how these select methods work
func (gui *Gui) handleBranchSelect(g *gocui.Gui, v *gocui.View) error {
if gui.popupPanelFocused() {
return nil
}
if _, err := gui.g.SetCurrentView(v.Name()); err != nil {
return err
}
// This really shouldn't happen: there should always be a master branch
if len(gui.State.Branches) == 0 {
return gui.renderString(g, "main", gui.Tr.SLocalize("NoBranchesThisRepo"))