Clear and redraw screen when resizing
This commit is contained in:
parent
2a8ba3160c
commit
82689e7fb8
|
@ -321,6 +321,7 @@ EventLoop:
|
|||
}
|
||||
}
|
||||
case *tcell.EventResize:
|
||||
// Throttle resize events.
|
||||
if time.Since(a.lastResize) < ResizeEventThrottle {
|
||||
// Stop timer
|
||||
if a.throttleResize != nil && !a.throttleResize.Stop() {
|
||||
|
@ -345,7 +346,7 @@ EventLoop:
|
|||
if screen == nil {
|
||||
continue
|
||||
}
|
||||
screen.Sync()
|
||||
screen.Clear()
|
||||
|
||||
// Call afterResize handler if there is one.
|
||||
if a.afterResize != nil {
|
||||
|
|
Loading…
Reference in New Issue