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

Fix a bug where numberOfEquivalentRows was always 0 when minimum contrast is...

Fix a bug where numberOfEquivalentRows was always 0 when minimum contrast is 0, which caused text to have the wrong foreground color.
parent c57437f4
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -119,6 +119,11 @@ static void iTermMakeBackgroundColorRun(iTermBackgroundColorRun *run,
[super dealloc];
}
 
- (NSString *)description {
return [NSString stringWithFormat:@"<%@: %p line=%@ numberEquiv=%@ runs:%@>",
self.class, self, @(self.line), @(self.numberOfEquivalentRows), self.array];
}
@end
 
@implementation iTermBoxedBackgroundColorRun {
Loading
Loading
@@ -139,6 +144,15 @@ static void iTermMakeBackgroundColorRun(iTermBackgroundColorRun *run,
[super dealloc];
}
 
- (NSString *)description {
return [NSString stringWithFormat:@"<%@: %p selected=%@ range=%@ backgroundColor=%@>",
self.class,
self,
@(_value.selected),
NSStringFromRange(_value.range),
self.backgroundColor];
}
- (iTermBackgroundColorRun *)valuePointer {
return &_value;
}
Loading
Loading
Loading
Loading
@@ -956,7 +956,7 @@ typedef struct iTermTextColorContext {
iTermBackgroundColorRunsInLine *fakeRuns = [[[iTermBackgroundColorRunsInLine alloc] init] autorelease];
fakeRuns.line = runs.line;
fakeRuns.y = runs.y;
fakeRuns.numberOfEquivalentRows = fakeRuns.numberOfEquivalentRows;
fakeRuns.numberOfEquivalentRows = runs.numberOfEquivalentRows;
fakeRuns.array = combinedRuns;
return fakeRuns;
}];
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