fix: render clearing bug and expand containment field
This commit is contained in:
parent
2ec00018bd
commit
ce12c51435
2 changed files with 3 additions and 3 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue