diff --git a/src/vs/workbench/contrib/terminal/browser/terminalInstance.ts b/src/vs/workbench/contrib/terminal/browser/terminalInstance.ts index 5ace875fb3f417..cd7c671dddb930 100644 --- a/src/vs/workbench/contrib/terminal/browser/terminalInstance.ts +++ b/src/vs/workbench/contrib/terminal/browser/terminalInstance.ts @@ -230,7 +230,6 @@ export class TerminalInstance extends Disposable implements ITerminalInstance { this._instanceId = TerminalInstance._instanceIdCounter++; this.hasHadInput = false; - this._titleReadyPromise = new Promise(c => { this._titleReadyComplete = c; }); @@ -1313,6 +1312,11 @@ export class TerminalInstance extends Disposable implements ITerminalInstance { this._webglAddon = new Addon(); try { this._xterm.loadAddon(this._webglAddon); + this._webglAddon.onContextLoss(() => { + this._logService.info(`Webgl lost context, disposing of webgl renderer`); + this._disposeOfWebglRenderer(); + this._safeSetOption('rendererType', 'dom'); + }); this._storageService.store(SUGGESTED_RENDERER_TYPE, 'auto', StorageScope.GLOBAL, StorageTarget.MACHINE); } catch (e) { this._logService.warn(`Webgl could not be loaded. Falling back to the canvas renderer type.`, e);