From d6dbd46793e5aaf7cc428e449b16483f50f534f5 Mon Sep 17 00:00:00 2001 From: Jesse Duffield Date: Sun, 22 Jul 2018 12:58:39 +1000 Subject: [PATCH] fix view cycling --- view_helpers.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/view_helpers.go b/view_helpers.go index abaeb950d..31cd89c40 100644 --- a/view_helpers.go +++ b/view_helpers.go @@ -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] {