fix conditions in Buffer.setBufferLineFactory
This commit is contained in:
+9
-7
@@ -55,14 +55,16 @@ export class Buffer implements IBuffer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public setBufferLineFactory(type: string): void {
|
public setBufferLineFactory(type: string): void {
|
||||||
if (type === 'JsArray' && this._bufferLineConstructor !== BufferLine) {
|
if (type === 'TypedArray') {
|
||||||
this._bufferLineConstructor = BufferLine;
|
if (this._bufferLineConstructor !== BufferLineTypedArray) {
|
||||||
this._recreateLines();
|
this._bufferLineConstructor = BufferLineTypedArray;
|
||||||
} else if (type === 'TypedArray' && this._bufferLineConstructor !== BufferLineTypedArray) {
|
this._recreateLines();
|
||||||
this._bufferLineConstructor = BufferLineTypedArray;
|
}
|
||||||
this._recreateLines();
|
|
||||||
} else {
|
} else {
|
||||||
this._bufferLineConstructor = BufferLine;
|
if (this._bufferLineConstructor !== BufferLine) {
|
||||||
|
this._bufferLineConstructor = BufferLine;
|
||||||
|
this._recreateLines();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user