Skip to content

Commit

Permalink
Fix predicate for checking conflict existence
Browse files Browse the repository at this point in the history
  • Loading branch information
mkchoi212 committed May 22, 2018
1 parent 7d9024a commit f0822c9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
1 change: 1 addition & 0 deletions layout.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ func layout(g *gocui.Gui) (err error) {
if err = makePrompt(g); err != nil {
return
}

return
}

Expand Down
10 changes: 6 additions & 4 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ func Start() (err error) {
}

Select(conflicts[cur], g, false)

if err = g.MainLoop(); err != nil {
return
}
Expand All @@ -89,10 +90,6 @@ func main() {
fmt.Println(color.Red(color.Regular, err.Error()))
return
}
if len(files) == 0 {
fmt.Println(color.Green(color.Regular, "No conflicts detected 🎉"))
return
}

for i := range files {
file := &files[i]
Expand All @@ -101,6 +98,11 @@ func main() {
}
}

if len(conflicts) == 0 {
fmt.Println(color.Green(color.Regular, "No conflicts detected 🎉"))
return
}

// Main GUI loop
for {
if err := Start(); err != nil {
Expand Down

0 comments on commit f0822c9

Please sign in to comment.