make typed array buffer default

This commit is contained in:
Jörg Breitbart
2018-12-04 18:55:11 +01:00
parent 6e45d022ac
commit 6ee9178302
3 changed files with 13 additions and 12 deletions
+4 -4
View File
@@ -7,7 +7,7 @@ import { CircularList } from './common/CircularList';
import { CharData, ITerminal, IBuffer, IBufferLine, BufferIndex, IBufferStringIterator, IBufferStringIteratorResult, IBufferLineConstructor } from './Types';
import { EventEmitter } from './common/EventEmitter';
import { IMarker } from 'xterm';
import { BufferLine, BufferLineTypedArray } from './BufferLine';
import { BufferLine, BufferLineJSArray } from './BufferLine';
import { DEFAULT_COLOR } from './renderer/atlas/Types';
export const DEFAULT_ATTR = (0 << 18) | (DEFAULT_COLOR << 9) | (256 << 0);
@@ -57,9 +57,9 @@ export class Buffer implements IBuffer {
}
public setBufferLineFactory(type: string): void {
if (type === 'TypedArray') {
if (this._bufferLineConstructor !== BufferLineTypedArray) {
this._bufferLineConstructor = BufferLineTypedArray;
if (type === 'JsArray') {
if (this._bufferLineConstructor !== BufferLineJSArray) {
this._bufferLineConstructor = BufferLineJSArray;
this._recreateLines();
}
} else {