Update readme and examples

Moved the PollEvents call outside of the for loop
This commit is contained in:
Caleb Bassi
2018-11-29 15:32:42 -08:00
parent 27bbe8c0de
commit ed219e8c05
16 changed files with 45 additions and 25 deletions

View File

@@ -42,8 +42,9 @@ func main() {
ui.Render(p0, p1, p2, p3)
uiEvents := ui.PollEvents()
for {
e := <-ui.PollEvent()
e := <-uiEvents
switch e.ID {
case "q", "<C-c>":
return