From ce4d2b72fa3375fb917f05fc02293af455938cc7 Mon Sep 17 00:00:00 2001
From: Antonio Russo <aerusso@aerusso.net>
Date: Sun, 13 Dec 2020 18:29:55 -0700
Subject: [PATCH] Revert "Fix bold character color paint"

This reverts commit 270d6ea3247bb41a51535129e4b1c8eef51cf316.  270d6
intended to address a desire expressed in bug 405345 to be able to print
bold characters without also getting the "intense" color described in
the theme.

The user also wants to be able to access the intense color, but by using
ANSI codes 90-97, so simply setting the theme to not have a different
intense color is inadequate to fully address that bug.  This is an
unconventional behavior, and is not described in the Wikipedia article
on ANSI color sequences [1] or ECMA-048 [2].  The behavior is not
present at the standard Linux terminal, xterm, nor xfce4-terminal,
version 0.8.9.2 (clean install from Debian unstable as of this writing).

As implemented, the commit being reverted here breaks existing behavior,
and is not expressed in, e.g., the ncurses terminfo library.

This new behavior must be controlled by a configuration option, and a
more complete solution will follow.

[1] https://en.wikipedia.org/wiki/ANSI_escape_code
[2] https://www.ecma-international.org/publications/files/ECMA-ST/Ecma-048.pdf

Fixes: 430311
Signed-off-by: Antonio Russo <aerusso@aerusso.net>
---
 src/Screen.cpp | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/src/Screen.cpp b/src/Screen.cpp
index bba16a97..1cde7131 100644
--- a/src/Screen.cpp
+++ b/src/Screen.cpp
@@ -461,8 +461,14 @@ void Screen::updateEffectiveRendition()
         _effectiveBackground = _currentBackground;
     }
 
-    if ((_currentRendition & RE_BOLD) == 0 && (_currentRendition & RE_FAINT) != 0) {
+    if ((_currentRendition & RE_BOLD) != 0) {
+        if ((_currentRendition & RE_FAINT) == 0) {
+            _effectiveForeground.setIntensive();
+        }
+    } else {
+        if ((_currentRendition & RE_FAINT) != 0) {
             _effectiveForeground.setFaint();
+        }
     }
 }
 
-- 
GitLab

