Remove race conditions from screen update

This commit is contained in:
Junegunn Choi 2015-01-04 05:09:40 +09:00
parent d2f7acbc69
commit 606d33e77e

View File

@ -297,7 +297,6 @@ func (t *Terminal) printAll() {
}
func (t *Terminal) refresh() {
t.placeCursor()
C.Refresh()
}
@ -353,6 +352,7 @@ func (t *Terminal) Loop() {
t.initFunc()
t.printInfo()
t.printPrompt()
t.placeCursor()
t.refresh()
t.mutex.Unlock()
}
@ -382,6 +382,7 @@ func (t *Terminal) Loop() {
os.Exit(1)
}
}
t.placeCursor()
t.mutex.Unlock()
})
t.refresh()