mirror of
https://github.com/zyedidia/micro.git
synced 2026-03-30 06:37:14 +09:00
@@ -388,7 +388,6 @@ func DoEvent() {
|
|||||||
var event tcell.Event
|
var event tcell.Event
|
||||||
|
|
||||||
// Display everything
|
// Display everything
|
||||||
screen.DrawLock.Lock()
|
|
||||||
screen.Screen.Fill(' ', config.DefStyle)
|
screen.Screen.Fill(' ', config.DefStyle)
|
||||||
screen.Screen.HideCursor()
|
screen.Screen.HideCursor()
|
||||||
action.Tabs.Display()
|
action.Tabs.Display()
|
||||||
@@ -398,7 +397,6 @@ func DoEvent() {
|
|||||||
action.MainTab().Display()
|
action.MainTab().Display()
|
||||||
action.InfoBar.Display()
|
action.InfoBar.Display()
|
||||||
screen.Screen.Show()
|
screen.Screen.Show()
|
||||||
screen.DrawLock.Unlock()
|
|
||||||
|
|
||||||
// Check for new events
|
// Check for new events
|
||||||
select {
|
select {
|
||||||
|
|||||||
@@ -24,7 +24,6 @@ var Events chan (tcell.Event)
|
|||||||
|
|
||||||
// The lock is necessary since the screen is polled on a separate thread
|
// The lock is necessary since the screen is polled on a separate thread
|
||||||
var lock sync.Mutex
|
var lock sync.Mutex
|
||||||
var DrawLock sync.Mutex
|
|
||||||
|
|
||||||
// drawChan is a channel that will cause the screen to redraw when
|
// drawChan is a channel that will cause the screen to redraw when
|
||||||
// written to even if no event user event has occurred
|
// written to even if no event user event has occurred
|
||||||
@@ -121,7 +120,6 @@ func TempFini() bool {
|
|||||||
if !screenWasNil {
|
if !screenWasNil {
|
||||||
Screen.Fini()
|
Screen.Fini()
|
||||||
Lock()
|
Lock()
|
||||||
DrawLock.Lock()
|
|
||||||
Screen = nil
|
Screen = nil
|
||||||
}
|
}
|
||||||
return screenWasNil
|
return screenWasNil
|
||||||
@@ -132,7 +130,6 @@ func TempStart(screenWasNil bool) {
|
|||||||
if !screenWasNil {
|
if !screenWasNil {
|
||||||
Init()
|
Init()
|
||||||
Unlock()
|
Unlock()
|
||||||
DrawLock.Unlock()
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -128,7 +128,13 @@ func (t *Terminal) Close() {
|
|||||||
// call the lua function that the user has given as a callback
|
// call the lua function that the user has given as a callback
|
||||||
if t.getOutput {
|
if t.getOutput {
|
||||||
if t.callback != nil {
|
if t.callback != nil {
|
||||||
t.callback(t.output.String())
|
Jobs <- JobFunction{
|
||||||
|
Function: func(out string, args []interface{}) {
|
||||||
|
t.callback(out)
|
||||||
|
},
|
||||||
|
Output: t.output.String(),
|
||||||
|
Args: nil,
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user