Fix render's view clearing loop

This commit is contained in:
Christian Rocha 2020-06-17 10:48:08 -04:00
parent 217c506a49
commit 830beecffb
No known key found for this signature in database
GPG Key ID: D6CC7A16E5878018
1 changed files with 2 additions and 1 deletions

View File

@ -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