1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2024-11-26 09:00:57 +02:00

fix view cycling

This commit is contained in:
Jesse Duffield 2018-07-22 12:58:39 +10:00
parent 001ea1002d
commit d6dbd46793

View File

@ -43,8 +43,8 @@ func nextView(g *gocui.Gui, v *gocui.View) error {
func previousView(g *gocui.Gui, v *gocui.View) error {
var focusedViewName string
if v == nil || v.Name() == cyclableViews[len(cyclableViews)-1] {
focusedViewName = cyclableViews[0]
if v == nil || v.Name() == cyclableViews[0] {
focusedViewName = cyclableViews[len(cyclableViews)-1]
} else {
for i := range cyclableViews {
if v.Name() == cyclableViews[i] {