diff --git a/gui.go b/gui.go index c307653..c9aec44 100644 --- a/gui.go +++ b/gui.go @@ -533,10 +533,6 @@ func (g *Gui) SetManagerFunc(manager func(*Gui) error) { // MainLoop runs the main loop until an error is returned. A successful // finish should return ErrQuit. func (g *Gui) MainLoop() error { - if err := g.flush(); err != nil { - return err - } - go func() { for { select { @@ -552,9 +548,6 @@ func (g *Gui) MainLoop() error { Screen.EnableMouse() } - if err := g.flush(); err != nil { - return err - } for { select { case ev := <-g.gEvents: @@ -619,7 +612,8 @@ func (g *Gui) handleEvent(ev *GocuiEvent) error { // flush updates the gui, re-drawing frames and buffers. func (g *Gui) flush() error { - g.clear(g.FgColor, g.BgColor) + // pretty sure we don't need this, but keeping it here in case we get weird visual artifacts + // g.clear(g.FgColor, g.BgColor) maxX, maxY := Screen.Size() // if GUI's size has changed, we need to redraw all views