diff --git a/src/vs/workbench/contrib/terminal/browser/terminalInstance.ts b/src/vs/workbench/contrib/terminal/browser/terminalInstance.ts index fb6692af542ee..8141b5dfb1fbb 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 ec5d7e7b24d59..adbbbbdb10dd2 100644 --- a/src/vs/workbench/contrib/terminal/browser/xterm/xtermTerminal.ts +++ b/src/vs/workbench/contrib/terminal/browser/xterm/xtermTerminal.ts @@ -287,8 +287,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); }