From 9b6c4e046f61c39470d9d7ed295df03d55dc68df Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Sat, 16 Sep 2017 10:57:49 -0700 Subject: [PATCH] Only refresh char atlas when char dimensions are valid See Microsoft/vscode#34493 --- src/renderer/BaseRenderLayer.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/renderer/BaseRenderLayer.ts b/src/renderer/BaseRenderLayer.ts index 8f655de5..4cc07472 100644 --- a/src/renderer/BaseRenderLayer.ts +++ b/src/renderer/BaseRenderLayer.ts @@ -57,6 +57,9 @@ export abstract class BaseRenderLayer implements IRenderLayer { * @param colorSet The color set to use for the char atlas. */ private _refreshCharAtlas(terminal: ITerminal, colorSet: IColorSet): void { + if (this._scaledCharWidth > 0 && this._scaledCharHeight > 0) { + return; + } this._charAtlas = null; const result = acquireCharAtlas(terminal, this._colors, this._scaledCharWidth, this._scaledCharHeight); if (result instanceof HTMLCanvasElement) {