[NSColor blackColor], NSForegroundColorAttributeName,
nafont, NSFontAttributeName,
[NSNumber numberWithInt:2],NSUnderlineStyleAttributeName,
-@@ -712,6 +712,7 @@ static BOOL tigerOrLater;
- struct timeval now;
- int oldTopLine, oldBottomLine;
- int bgstart;
-+ int bgwidth;
- BOOL bgselected = NO;
- BOOL hasBGImage = [(PTYScrollView *)[self enclosingScrollView] backgroundImage] != nil;
-
-@@ -816,6 +817,7 @@ static BOOL tigerOrLater;
- // Contiguous sections of background with the same colour
- // are combined into runs and draw as one operation
- bgstart = -1;
-+ bgwidth = 0;
- j = 0;
- while(j <= WIDTH) {
- selected = [self _isCharSelectedInRow:line col:j checkOld:NO];
-@@ -826,22 +828,26 @@ static BOOL tigerOrLater;
- (dirty && dirty[j]) ||
- (theLine[j].fg_color & BLINK_MASK)
- );
-+ double_width = j<WIDTH-1 && (theLine[j+1].ch == 0xffff);
-
- if(need_draw && bgstart < 0) {
- // Start new run
- bgstart = j;
-+ bgwidth = 0;
- bgcode = theLine[j].bg_color;
- bgselected = selected;
- }
-
- if(need_draw && bgselected == selected && theLine[j].bg_color == bgcode) {
- // Continue the run
-+ bgwidth += double_width ? 2 : 1;
- j++;
- }
- else if(bgstart >= 0) {
- // This run is finished, draw it
-- bgRect = NSMakeRect(floor(curX+bgstart*charWidth),curY-lineHeight,ceil((j-bgstart)*charWidth),lineHeight);
-+ bgRect = NSMakeRect(floor(curX+bgstart*charWidth),curY-lineHeight,ceil(bgwidth*charWidth),lineHeight);
- bgstart = -1;
-+ bgwidth = 0;
+@@ -2519,11 +2519,11 @@ static BOOL leopardOrLater;
+ }
- if(hasBGImage) {
- [(PTYScrollView *)[self enclosingScrollView] drawBackgroundImageRect: bgRect];
-@@ -855,6 +861,7 @@ static BOOL tigerOrLater;
- }
- else {
- // Don't need to draw and not on a run, move to next char
-+ bgwidth += double_width ? 2 : 1;
- j++;
- }
- }
-@@ -2542,12 +2549,12 @@ static BOOL tigerOrLater;
-
-
crap = [NSString stringWithCharacters:&code length:1];
-- [crap drawAtPoint:NSMakePoint(X,Y-lineHeight) withAttributes:attrib];
-+ [crap drawAtPoint:NSMakePoint(X,Y-lineHeight*(dw?1.0f:1.25f)) withAttributes:attrib];
+- [crap drawAtPoint:NSMakePoint(X,Y) withAttributes:attrib];
++ [crap drawAtPoint:NSMakePoint(X,Y-(dw?0:lineHeight*0.25f)) withAttributes:attrib];
// on older systems, for bold, redraw the character offset by 1 pixel
- if (renderBold && (!tigerOrLater || !antiAlias))
- {
-- [crap drawAtPoint:NSMakePoint(X+1,Y-lineHeight) withAttributes:attrib];
-+ [crap drawAtPoint:NSMakePoint(X+1,Y-lineHeight*(dw?1.0f:1.25f)) withAttributes:attrib];
+ if (renderBold && (!tigerOrLater || !antiAlias)) {
+- [crap drawAtPoint:NSMakePoint(X+1,Y) withAttributes:attrib];
++ [crap drawAtPoint:NSMakePoint(X+1,Y-(dw?0:lineHeight*0.25f)) withAttributes:attrib];
}
}