mirror of
https://github.com/Hopiu/micro.git
synced 2026-03-17 06:20:28 +00:00
Fix race condition with events channel
This commit is contained in:
parent
5180634947
commit
ff24ad5fa8
1 changed files with 2 additions and 1 deletions
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Reference in a new issue