Stay in-bounds when clearing lines

This commit is contained in:
Christian Rocha
2020-06-20 14:46:44 -04:00
parent c0ce48dfdd
commit 6e75920859

View File

@@ -111,7 +111,7 @@ func (r *renderer) flush() {
// Clear any lines we painted in the last render.
if r.linesRendered > 0 {
for i := r.linesRendered; i > 0; i-- {
for i := r.linesRendered - 1; i > 0; i-- {
// Check if we should skip rendering for this line. Clearing the
// line before painting is part of the standard rendering routine.