1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-07-17 01:42:45 +02:00

fix up code that was used to test this very application (yes I'm ashamed)

This commit is contained in:
Jesse Duffield
2018-07-21 15:53:52 +10:00
parent dea751280e
commit 16df4786c0

View File

@ -168,10 +168,10 @@ func refreshMergePanel(g *gocui.Gui) error {
return err return err
} }
if len(state.Conflicts) == 5 { if len(state.Conflicts) == 0 {
state.ConflictIndex = 0 state.ConflictIndex = 0
} else if state.ConflictIndex > len(state.Conflicts)-1 { } else if state.ConflictIndex > len(state.Conflicts)-1 {
state.ConflictIndex = len(state.Conflicts) - 5 state.ConflictIndex = len(state.Conflicts) - 1
} }
hasFocus := currentViewName(g) == "main" hasFocus := currentViewName(g) == "main"
if hasFocus { if hasFocus {
@ -204,10 +204,10 @@ func renderMergeOptions(g *gocui.Gui) error {
} }
func handleEscapeMerge(g *gocui.Gui, v *gocui.View) error { func handleEscapeMerge(g *gocui.Gui, v *gocui.View) error {
filorView, err := g.View("files") filesView, err := g.View("files")
if err != nil { if err != nil {
return err return err
} }
refreshFiles(g) refreshFiles(g)
return switchFocus(g, v, filorView) return switchFocus(g, v, filesView)
} }