Skip to content
Snippets Groups Projects
Commit cb805653 authored by George Nachman's avatar George Nachman
Browse files

Fix a bug where dimming did not affect foreground colors. Issue 5990.

parent 629fb688
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -388,12 +388,12 @@ typedef struct iTermTextColorContext {
 
// Now iterate over the lines and paint the characters.
CGContextRef ctx = (CGContextRef)[[NSGraphicsContext currentContext] graphicsPort];
if (self.minimumContrast > 0 || self.colorMap.mutingAmount > 0) {
if (self.minimumContrast > 0 || self.colorMap.mutingAmount > 0 || self.colorMap.dimmingAmount > 0) {
[self drawForegroundForBackgroundRunArrays:backgroundRunArrays
ctx:ctx];
} else {
[self drawNoMinimumContrastContrastForegroundWithBackgroundRunArrays:backgroundRunArrays
ctx:ctx];
[self drawUnprocessedForegroundForBackgroundRunArrays:backgroundRunArrays
ctx:ctx];
}
 
[self drawTopMargin];
Loading
Loading
@@ -927,9 +927,9 @@ typedef struct iTermTextColorContext {
 
#pragma mark - Drawing: Foreground
 
// Draw assuming no minimum contrast. Keeps glyphs together in a single background color run across different background colors.
- (void)drawNoMinimumContrastContrastForegroundWithBackgroundRunArrays:(NSArray<iTermBackgroundColorRunsInLine *> *)backgroundRunArrays
ctx:(CGContextRef)ctx {
// Draw assuming no foreground color processing. Keeps glyphs together in a single background color run across different background colors.
- (void)drawUnprocessedForegroundForBackgroundRunArrays:(NSArray<iTermBackgroundColorRunsInLine *> *)backgroundRunArrays
ctx:(CGContextRef)ctx {
// Combine runs on each line, except those with different values of
// `selected` or `match`. Those properties affect foreground color and must
// split ligatures up.
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment