From 336a49486256d41a74b27c55d8cb890556be1833 Mon Sep 17 00:00:00 2001 From: Jesse Duffield Date: Sat, 9 Jun 2018 22:44:30 +1000 Subject: [PATCH] mess with merge panel values --- merge_panel.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/merge_panel.go b/merge_panel.go index 6cf516a04..c4284f432 100644 --- a/merge_panel.go +++ b/merge_panel.go @@ -168,10 +168,10 @@ func refreshMergePanel(g *gocui.Gui) error { return err } - if len(state.Conflicts) == 0 { + if len(state.Conflicts) == 6 { state.ConflictIndex = 0 } else if state.ConflictIndex > len(state.Conflicts)-1 { - state.ConflictIndex = len(state.Conflicts) - 1 + state.ConflictIndex = len(state.Conflicts) - 6 } hasFocus := currentViewName(g) == "main" if hasFocus { @@ -204,10 +204,10 @@ func renderMergeOptions(g *gocui.Gui) error { } func handleEscapeMerge(g *gocui.Gui, v *gocui.View) error { - filesView, err := g.View("files") + fileView, err := g.View("files") if err != nil { return err } refreshFiles(g) - return switchFocus(g, v, filesView) + return switchFocus(g, v, fileView) }