fix: render clearing bug and expand containment field

This commit is contained in:
mitchell 2026-04-16 17:13:12 -04:00
parent 2ec00018bd
commit ce12c51435
2 changed files with 3 additions and 3 deletions

View file

@ -38,12 +38,12 @@ export default class StreamRenderer {
if (text.includes("\n")) {
this.lineCount += text.match(/\n/g)?.length ?? 1;
this.charsSinceNL = text.length - text.lastIndexOf("\n") - 1;
} else if (this.charsSinceNL >= columns) {
} else if (this.charsSinceNL > columns) {
this.lineCount++;
this.charsSinceNL = this.charsSinceNL - columns;
}
if (this.lineCount >= rows / 2) {
if (this.lineCount >= Math.floor(rows * 0.75)) {
this.moveCursor(0, -this.lineCount);
this.clearScreenDown();
this.lineCount = 0;