From 2819e7ed4e882b5dd80e68695bc41a7e2c05f529 Mon Sep 17 00:00:00 2001 From: Eric Myhre Date: Mon, 28 Mar 2016 13:48:41 -0500 Subject: [PATCH] Clear screen during re-layouts in example Doing re-layout for changes in window size may leave coordinates that are now not painted over by any active components. (I experienced this when updating the example to have the `ls` object take up 2 grid widths and be offset 1, for example.) It's probably a good idea to pair big re-layout&re-draw operations with a `Clear` call. --- _example/grid.go | 1 + 1 file changed, 1 insertion(+) diff --git a/_example/grid.go b/_example/grid.go index d4078c5..f05fa42 100644 --- a/_example/grid.go +++ b/_example/grid.go @@ -114,6 +114,7 @@ func main() { ui.Handle("/sys/wnd/resize", func(e ui.Event) { ui.Body.Width = ui.TermWidth() ui.Body.Align() + ui.Clear() ui.Render(ui.Body) })