From 5b20f76ee0990b121cf3089aa3d9e91f6448bdf6 Mon Sep 17 00:00:00 2001 From: Jean Pierre Date: Mon, 15 May 2023 15:58:21 -0500 Subject: [PATCH] Fixes #135968 --- src/vs/workbench/contrib/terminal/browser/terminalInstance.ts | 1 + .../workbench/contrib/terminal/browser/xterm/xtermTerminal.ts | 2 -- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/vs/workbench/contrib/terminal/browser/terminalInstance.ts b/src/vs/workbench/contrib/terminal/browser/terminalInstance.ts index a5dc797b5c370..a01d47dca1912 100644 --- a/src/vs/workbench/contrib/terminal/browser/terminalInstance.ts +++ b/src/vs/workbench/contrib/terminal/browser/terminalInstance.ts @@ -870,6 +870,7 @@ export class TerminalInstance extends Disposable implements ITerminalInstance { this._container = container; this._container.appendChild(this._wrapperElement); this._onDidAttachToElement.fire(this._container); + this.xterm?.refresh(); setTimeout(() => this._initDragAndDrop(container)); } diff --git a/src/vs/workbench/contrib/terminal/browser/xterm/xtermTerminal.ts b/src/vs/workbench/contrib/terminal/browser/xterm/xtermTerminal.ts index 816683d94686b..123da2469ea18 100644 --- a/src/vs/workbench/contrib/terminal/browser/xterm/xtermTerminal.ts +++ b/src/vs/workbench/contrib/terminal/browser/xterm/xtermTerminal.ts @@ -283,8 +283,6 @@ export class XtermTerminal extends DisposableStore implements IXtermTerminal, II } attachToElement(container: HTMLElement): HTMLElement { - // Update the theme when attaching as the terminal location could have changed - this._updateTheme(); if (!this._container) { this.raw.open(container); }