Clear alt buffer with erase attributes upon entering

This commit is contained in:
Jeff Smith
2018-11-16 14:33:37 -06:00
parent a19d93851c
commit 2f90035243
5 changed files with 14 additions and 6 deletions
+5 -2
View File
@@ -114,11 +114,14 @@ export class Buffer implements IBuffer {
/**
* Fills the buffer's viewport with blank lines.
*/
public fillViewportRows(): void {
public fillViewportRows(fillAttr?: number): void {
if (this.lines.length === 0) {
if (fillAttr === undefined) {
fillAttr = DEFAULT_ATTR;
}
let i = this._terminal.rows;
while (i--) {
this.lines.push(this.getBlankLine(DEFAULT_ATTR));
this.lines.push(this.getBlankLine(fillAttr));
}
}
}