Fix race condition with events channel

This commit is contained in:
Zachary Yedidia
2019-12-29 18:53:59 -05:00
parent 5180634947
commit ff24ad5fa8

View File

@@ -211,9 +211,10 @@ func main() {
action.InitTabs(b)
action.InitGlobals()
events = make(chan tcell.Event)
// Here is the event loop which runs in a separate thread
go func() {
events = make(chan tcell.Event)
for {
screen.Lock()
e := screen.Screen.PollEvent()