change deleteCells to new interface
This commit is contained in:
+3
-5
@@ -295,20 +295,18 @@ export class BufferLine implements IBufferLine {
|
||||
}
|
||||
}
|
||||
|
||||
public deleteCells(pos: number, n: number, fillCharData: CharData): void {
|
||||
public deleteCells(pos: number, n: number, fillCellData: ICellData): void {
|
||||
pos %= this.length;
|
||||
if (n < this.length - pos) {
|
||||
for (let i = 0; i < this.length - pos - n; ++i) {
|
||||
this.setCell(pos + i, this.loadCell(pos + n + i, this._cell));
|
||||
}
|
||||
this._cell.setFromCharData(fillCharData);
|
||||
for (let i = this.length - n; i < this.length; ++i) {
|
||||
this.setCell(i, this._cell);
|
||||
this.setCell(i, fillCellData);
|
||||
}
|
||||
} else {
|
||||
this._cell.setFromCharData(fillCharData);
|
||||
for (let i = pos; i < this.length; ++i) {
|
||||
this.setCell(i, this._cell);
|
||||
this.setCell(i, fillCellData);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user