SerializeAddon: move test util into seperate file
This commit is contained in:
@@ -412,25 +412,5 @@ export class SerializeAddon implements ITerminalAddon {
|
||||
+ alternativeScreenContent;
|
||||
}
|
||||
|
||||
// this is a util used only for test
|
||||
private static _inspectBuffer(buffer: IBuffer): { x: number, y: number, data: any[][] } {
|
||||
const lines: any[] = [];
|
||||
|
||||
for (let i = 0; i < buffer.length; i++) {
|
||||
/**
|
||||
* Do this intentionally to get content of underlining source
|
||||
*/
|
||||
const bufferLine = (buffer.getLine(i)! as any)._line;
|
||||
|
||||
lines.push(JSON.stringify(bufferLine));
|
||||
}
|
||||
|
||||
return {
|
||||
x: buffer.cursorX,
|
||||
y: buffer.cursorY,
|
||||
data: lines
|
||||
};
|
||||
}
|
||||
|
||||
public dispose(): void { }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user