From 82689e7fb8fbd1cc9b67bf47fdfd6df51e7b7507 Mon Sep 17 00:00:00 2001 From: Trevor Slocum Date: Sat, 15 Feb 2020 07:53:48 -0800 Subject: [PATCH] Clear and redraw screen when resizing --- application.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/application.go b/application.go index 7ee645c..94d4802 100644 --- a/application.go +++ b/application.go @@ -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 {