diff --git a/src/vs/workbench/parts/output/common/outputEditorInput.ts b/src/vs/workbench/parts/output/common/outputEditorInput.ts index 82d975cf08497d02c73d03734fba84771b60fce8..8a1c8c632d4b7e77f4e09ce82b235887fcf6baea 100644 --- a/src/vs/workbench/parts/output/common/outputEditorInput.ts +++ b/src/vs/workbench/parts/output/common/outputEditorInput.ts @@ -83,7 +83,11 @@ export class OutputEditorInput extends StringEditorInput { private onOutputReceived(e: IOutputEvent): void { if (this.outputSet && e.channel === this.channel) { if (e.output) { - this.bufferedOutput += e.output; + if (this.bufferedOutput.length + e.output.length > MAX_OUTPUT_LENGTH) { + this.bufferedOutput = '...' + this.bufferedOutput.substr(this.bufferedOutput.length + e.output.length - MAX_OUTPUT_LENGTH); + } + + this.bufferedOutput += e.output.substr(0, MAX_OUTPUT_LENGTH); this.scheduleOutputAppend(); } else if (e.output === null) { this.clearValue(); // special output indicates we should clear