From a56edd65a7d02340fe2c225639c5793ab156896d Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Tue, 10 Oct 2017 22:37:13 -0700 Subject: [PATCH] Fix ansi bright text being bold without bold flag Fixes #1047 --- src/renderer/BaseRenderLayer.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/renderer/BaseRenderLayer.ts b/src/renderer/BaseRenderLayer.ts index d15f1ee7..614286c8 100644 --- a/src/renderer/BaseRenderLayer.ts +++ b/src/renderer/BaseRenderLayer.ts @@ -234,7 +234,10 @@ export abstract class BaseRenderLayer implements IRenderLayer { } } const isAscii = code < 256; - const isBasicColor = (colorIndex > 1 && fg < 16); + // A color is basic if it is one of the standard normal or bold weight + // colors of the characters held in the char atlas. Note that this excludes + // the normal weight light color characters + const isBasicColor = (colorIndex > 1 && fg < 16) && (fg < 8 || bold); const isDefaultColor = fg >= 256; const isDefaultBackground = bg >= 256; if (this._charAtlas && isAscii && (isBasicColor || isDefaultColor) && isDefaultBackground) {