From f0822c975185cd8330ad4aa66f0aa8b2c4664831 Mon Sep 17 00:00:00 2001 From: "Mike JS. Choi" Date: Tue, 22 May 2018 18:34:12 -0500 Subject: [PATCH] Fix predicate for checking conflict existence --- layout.go | 1 + main.go | 10 ++++++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/layout.go b/layout.go index d7e90cb..1ec6ea3 100644 --- a/layout.go +++ b/layout.go @@ -39,6 +39,7 @@ func layout(g *gocui.Gui) (err error) { if err = makePrompt(g); err != nil { return } + return } diff --git a/main.go b/main.go index 9d521b0..cdd396d 100644 --- a/main.go +++ b/main.go @@ -74,6 +74,7 @@ func Start() (err error) { } Select(conflicts[cur], g, false) + if err = g.MainLoop(); err != nil { return } @@ -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] @@ -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 {