From 830beecffb767c5d40afd47d3f0bfe4cd4a5f929 Mon Sep 17 00:00:00 2001 From: Christian Rocha Date: Wed, 17 Jun 2020 10:48:08 -0400 Subject: [PATCH] Fix render's view clearing loop --- renderer.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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