Fix row removal in reflowLarger

This commit is contained in:
Daniel Imms
2018-12-27 23:49:59 -08:00
parent 314f98f2a6
commit fa47036982
2 changed files with 5 additions and 14 deletions
+3 -3
View File
@@ -228,8 +228,8 @@ export class BufferLine implements IBufferLine {
}
}
public resize(cols: number, fillCharData: CharData, shrink: boolean = false): void {
if (cols === this.length || (!shrink && cols < this.length)) {
public resize(cols: number, fillCharData: CharData): void {
if (cols === this.length) {
return;
}
if (cols > this.length) {
@@ -245,7 +245,7 @@ export class BufferLine implements IBufferLine {
for (let i = this.length; i < cols; ++i) {
this.set(i, fillCharData);
}
} else if (shrink) {
} else {
if (cols) {
const data = new Uint32Array(cols * CELL_SIZE);
data.set(this._data.subarray(0, cols * CELL_SIZE));