+ }()
+ // Display everything
+ screen.Screen.Fill(' ', config.DefStyle)
+ screen.Screen.HideCursor()
+ action.Tabs.Display()
+ for _, ep := range action.MainTab().Panes {
+ ep.Display()
+ }
+ action.MainTab().Display()
+ action.InfoBar.Display()
+ screen.Screen.Show()
+
+ // Check for new events
+ select {
+ case f := <-shell.Jobs:
+ // If a new job has finished while running in the background we should execute the callback
+ f.Function(f.Output, f.Args)
+ case <-config.Autosave:
+ for _, b := range buffer.OpenBuffers {
+ b.Save()
+ }
+ case <-shell.CloseTerms:
+ case event = <-events:
+ case <-screen.DrawChan():
+ }
+
+ if action.InfoBar.HasPrompt {
+ action.InfoBar.HandleEvent(event)
+ } else {
+ action.Tabs.HandleEvent(event)