From 012a409a510d4031a05b15de1087673978d4495e Mon Sep 17 00:00:00 2001 From: Daniel Imms <2193314+Tyriar@users.noreply.github.com> Date: Fri, 17 Jun 2022 10:04:23 -0700 Subject: [PATCH] Make sure _serializer is set before calling setTitle --- src/vs/platform/terminal/node/ptyService.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/vs/platform/terminal/node/ptyService.ts b/src/vs/platform/terminal/node/ptyService.ts index d387f795c72bf..9cf88cb6b4254 100644 --- a/src/vs/platform/terminal/node/ptyService.ts +++ b/src/vs/platform/terminal/node/ptyService.ts @@ -513,9 +513,6 @@ export class PersistentTerminalProcess extends Disposable { fixedDimensions?: IFixedTerminalDimensions ) { super(); - if (name) { - this.setTitle(name, TitleEventSource.Api); - } this._logService.trace('persistentTerminalProcess#ctor', _persistentProcessId, arguments); this._wasRevived = reviveBuffer !== undefined; this._serializer = new XtermSerializer( @@ -524,9 +521,12 @@ export class PersistentTerminalProcess extends Disposable { reconnectConstants.scrollback, unicodeVersion, reviveBuffer, - rawReviveBuffer, + shouldPersistTerminal ? rawReviveBuffer : undefined, this._logService ); + if (name) { + this.setTitle(name, TitleEventSource.Api); + } this._fixedDimensions = fixedDimensions; this._orphanQuestionBarrier = null; this._orphanQuestionReplyTime = 0;