1
0
mirror of https://github.com/rivo/tview.git synced 2025-04-26 13:49:06 +08:00

Actual fix.

This commit is contained in:
Travis Howse 2022-08-14 23:16:21 +10:00
parent f541eaf9cd
commit 1a01dc6ba1

View File

@ -181,6 +181,7 @@ func (a *Application) SetScreen(screen tcell.Screen) *Application {
// Run() has not been called yet.
a.screen = screen
a.Unlock()
screen.Init()
return a
}
@ -284,9 +285,8 @@ func (a *Application) Run() error {
a.screen = screen
enableMouse := a.enableMouse
a.Unlock()
// Initialize and draw this screen.
if err := a.screen.Init(); err != nil {
if err := screen.Init(); err != nil {
panic(err)
}
if enableMouse {