Skip to content

Commit

Permalink
Enable swtiching between multiple conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
mkchoi212 committed Dec 28, 2017
1 parent da7adc8 commit 162b566
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ func layout(g *gocui.Gui) error {
v.Title = "Conflicts"
}

selectConflict(0, g)
return nil
}

Expand Down Expand Up @@ -111,7 +110,6 @@ func nextConflict(g *gocui.Gui, v *gocui.View) error {
}

func resolveConflict(g *gocui.Gui, v *gocui.View) error {

g.Update(func(g *gocui.Gui) error {
conflicts[current].Resolve()
selectConflict(current, g)
Expand Down Expand Up @@ -160,6 +158,11 @@ func main() {
log.Panicln(err)
}

g.Update(func(g *gocui.Gui) error {
selectConflict(0, g)
return nil
})

if err := g.MainLoop(); err != nil && err != gocui.ErrQuit {
log.Panicln(err)
}
Expand Down

0 comments on commit 162b566

Please sign in to comment.