mirror of
https://github.com/jesseduffield/lazygit.git
synced 2026-09-10 15:46:26 -04:00
always reset branch selected index when creating new branch
This commit is contained in:
parent
1189c2fab7
commit
262ff24c5b
|
|
@ -226,6 +226,7 @@ func (gui *Gui) createNewBranchWithName(newBranchName string) error {
|
|||
if err := gui.GitCommand.NewBranch(newBranchName, branch.Name); err != nil {
|
||||
return gui.surfaceError(err)
|
||||
}
|
||||
|
||||
gui.State.Panels.Branches.SelectedLineIdx = 0
|
||||
return gui.refreshSidePanels(refreshOptions{mode: ASYNC})
|
||||
}
|
||||
|
|
@ -482,9 +483,10 @@ func (gui *Gui) handleNewBranchOffCurrentItem() error {
|
|||
if err := gui.switchContext(gui.Contexts.Branches.Context); err != nil {
|
||||
return err
|
||||
}
|
||||
gui.State.Panels.Branches.SelectedLineIdx = 0
|
||||
}
|
||||
|
||||
gui.State.Panels.Branches.SelectedLineIdx = 0
|
||||
|
||||
return gui.refreshSidePanels(refreshOptions{mode: ASYNC})
|
||||
})
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue