Actively place the cursor after a normal render

This commit is contained in:
Christian Rocha
2020-06-22 13:36:06 -04:00
parent ebbab2908c
commit 8bab4bce9a

View File

@@ -153,6 +153,10 @@ func (r *renderer) flush() {
r.linesRendered++
}
// Make sure the cursor is at the start of the last line to keep rendering
// behavior consistent.
moveCursor(out, r.linesRendered, 0)
_, _ = r.out.Write(out.Bytes())
r.lastRender = r.buf.String()
r.buf.Reset()