Skip to content

Commit

Permalink
Fix consecutive error handling logic
Browse files Browse the repository at this point in the history
  • Loading branch information
mkchoi212 committed Jan 4, 2018
1 parent 92c5515 commit e03a608
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,14 +60,14 @@ func parseInput(g *gocui.Gui, v *gocui.View) error {
default:
PrintPrompt(g, color.Red(color.Regular, "[wasd] >>"))
consecutiveError++
if consecutiveError == 2 {
consecutiveError = 0
Select(&conflict.All[cur], g, true)
}
return
}
consecutiveError = 0
PrintPrompt(g, color.Green(color.Regular, "[wasd] >>"))

if consecutiveError == 2 {
consecutiveError = 0
Select(&conflict.All[cur], g, true)
}
}

in := strings.TrimSuffix(v.Buffer(), "\n")
Expand Down

0 comments on commit e03a608

Please sign in to comment.