diff --git a/renderer.go b/renderer.go index 7c5e644..8473376 100644 --- a/renderer.go +++ b/renderer.go @@ -148,13 +148,14 @@ func (r *renderer) flush() { if r.linesRendered > 0 { // Clear the lines we painted in the last render. for i := r.linesRendered; i > 0; i-- { + cursorUp(out) + // Check and see if we should skip rendering for this line. That // includes clearing the line, which we normally do before a // render. if _, exists := r.ignoreLines[i]; !exists { clearLine(out) } - cursorUp(out) } } r.linesRendered = 0