remove static DefaultCell

This commit is contained in:
Jörg Breitbart
2018-08-30 20:27:52 +02:00
parent 04a847f0e2
commit 32231dcd41
2 changed files with 5 additions and 6 deletions
+2 -3
View File
@@ -5,13 +5,12 @@
import { CharData, IBufferLine } from './Types';
import { NULL_CELL_CODE, NULL_CELL_WIDTH, NULL_CELL_CHAR } from './Buffer';
export const defaultCell: CharData = [0, NULL_CELL_CHAR, NULL_CELL_WIDTH, NULL_CELL_CODE];
export const DEFAULT_CELL: CharData = [0, NULL_CELL_CHAR, NULL_CELL_WIDTH, NULL_CELL_CODE];
/**
* Class representing a terminal line.
*/
export class BufferLine implements IBufferLine {
static defaultCell: CharData = [0, NULL_CELL_CHAR, NULL_CELL_WIDTH, NULL_CELL_CODE];
static blankLine(cols: number, attr: number, isWrapped?: boolean): IBufferLine {
const ch: CharData = [attr, NULL_CELL_CHAR, NULL_CELL_WIDTH, NULL_CELL_CODE];
return new BufferLine(cols, ch, isWrapped);
@@ -25,7 +24,7 @@ export class BufferLine implements IBufferLine {
this.length = this._data.length;
if (cols) {
if (!ch) {
ch = BufferLine.defaultCell;
ch = DEFAULT_CELL;
}
for (let i = 0; i < cols; i++) {
this.push(ch); // Note: the ctor ch is not cloned