From 7762ab96a5b0d51b8bfcba20b4bf736f35f5a808 Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Fri, 14 Sep 2018 12:06:14 -0700 Subject: [PATCH] Exit draw early for the space character --- src/renderer/atlas/DynamicCharAtlas.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/renderer/atlas/DynamicCharAtlas.ts b/src/renderer/atlas/DynamicCharAtlas.ts index 7476a9f4..58aa9a18 100644 --- a/src/renderer/atlas/DynamicCharAtlas.ts +++ b/src/renderer/atlas/DynamicCharAtlas.ts @@ -106,6 +106,11 @@ export default class DynamicCharAtlas extends BaseCharAtlas { x: number, y: number ): boolean { + // Space is always an empty cell, special case this as it's so common + if (code === 32) { + return true; + } + const glyphKey = getGlyphCacheKey(code, fg, bg, bold, dim, italic); const cacheValue = this._cacheMap.get(glyphKey); if (cacheValue !== null && cacheValue !== undefined) {