mirror of
https://github.com/zyedidia/micro.git
synced 2026-03-30 14:47:16 +09:00
Fix race condition with events channel
This commit is contained in:
@@ -211,9 +211,10 @@ func main() {
|
|||||||
action.InitTabs(b)
|
action.InitTabs(b)
|
||||||
action.InitGlobals()
|
action.InitGlobals()
|
||||||
|
|
||||||
|
events = make(chan tcell.Event)
|
||||||
|
|
||||||
// Here is the event loop which runs in a separate thread
|
// Here is the event loop which runs in a separate thread
|
||||||
go func() {
|
go func() {
|
||||||
events = make(chan tcell.Event)
|
|
||||||
for {
|
for {
|
||||||
screen.Lock()
|
screen.Lock()
|
||||||
e := screen.Screen.PollEvent()
|
e := screen.Screen.PollEvent()
|
||||||
|
|||||||
Reference in New Issue
Block a user