var event tcell.Event
// Display everything
+ screen.DrawLock.Lock()
screen.Screen.Fill(' ', config.DefStyle)
screen.Screen.HideCursor()
action.Tabs.Display()
action.MainTab().Display()
action.InfoBar.Display()
screen.Screen.Show()
+ screen.DrawLock.Unlock()
// Check for new events
select {
// The lock is necessary since the screen is polled on a separate thread
var lock sync.Mutex
+var DrawLock sync.Mutex
// drawChan is a channel that will cause the screen to redraw when
// written to even if no event user event has occurred
if !screenWasNil {
Screen.Fini()
Lock()
+ DrawLock.Lock()
Screen = nil
}
return screenWasNil
if !screenWasNil {
Init()
Unlock()
+ DrawLock.Unlock()
}
}