My MacPorts
Revision | ac3f03b098a43b3f71ca02c90a4680b2b1e00eef (tree) |
---|---|
Time | 2009-03-14 18:23:40 |
Author | Kazuki Sakamoto <sakamoto@splh...> |
Commiter | Kazuki Sakamoto |
iTerm svn trunk r1714 with fixing drawRect
@@ -1,5 +1,5 @@ | ||
1 | 1 | ctags @5.6j1_1 (active) |
2 | 2 | fmdiff @7819_0 (active) |
3 | - iTerm @0.9.6_20090313 (active) | |
3 | + iTerm @0.9.6_20090314 (active) | |
4 | 4 | vim @7.2.132_0+cscope+gdb+huge+my+ruby (active) |
5 | 5 | zsh-devel @4.3.9_1+cjk+mp_completion+pcre (active) |
@@ -3,7 +3,7 @@ | ||
3 | 3 | PortSystem 1.0 |
4 | 4 | name iTerm |
5 | 5 | version 0.9.6 |
6 | -revision 20090313 | |
6 | +revision 20090314 | |
7 | 7 | categories aqua shells |
8 | 8 | maintainers waqar@macports.org |
9 | 9 | description Enhanced terminal emulator program for Mac OS X |
@@ -21,7 +21,7 @@ distfiles | ||
21 | 21 | patchfiles-append patch-PTYSession.m patch-PTYTextView.m |
22 | 22 | fetch.type svn |
23 | 23 | svn.url https://iterm.svn.sourceforge.net/svnroot/iterm/trunk iTerm |
24 | -svn.tag 1713 | |
24 | +svn.tag 1714 | |
25 | 25 | |
26 | 26 | worksrcdir ${name} |
27 | 27 | use_configure no |
@@ -1,7 +1,7 @@ | ||
1 | 1 | --- PTYTextView.m |
2 | 2 | +++ PTYTextView.m |
3 | -@@ -89,7 +89,7 @@ | |
4 | - | |
3 | +@@ -92,7 +92,7 @@ static BOOL tigerOrLater; | |
4 | + | |
5 | 5 | [self setMarkedTextAttributes: |
6 | 6 | [NSDictionary dictionaryWithObjectsAndKeys: |
7 | 7 | - [NSColor yellowColor], NSBackgroundColorAttributeName, |
@@ -9,7 +9,7 @@ | ||
9 | 9 | [NSColor blackColor], NSForegroundColorAttributeName, |
10 | 10 | nafont, NSFontAttributeName, |
11 | 11 | [NSNumber numberWithInt:2],NSUnderlineStyleAttributeName, |
12 | -@@ -493,7 +493,7 @@ | |
12 | +@@ -444,7 +444,7 @@ static BOOL tigerOrLater; | |
13 | 13 | nafont=naFont; |
14 | 14 | [self setMarkedTextAttributes: |
15 | 15 | [NSDictionary dictionaryWithObjectsAndKeys: |
@@ -18,3 +18,70 @@ | ||
18 | 18 | [NSColor blackColor], NSForegroundColorAttributeName, |
19 | 19 | nafont, NSFontAttributeName, |
20 | 20 | [NSNumber numberWithInt:2],NSUnderlineStyleAttributeName, |
21 | +@@ -712,6 +712,7 @@ static BOOL tigerOrLater; | |
22 | + struct timeval now; | |
23 | + int oldTopLine, oldBottomLine; | |
24 | + int bgstart; | |
25 | ++ int bgwidth; | |
26 | + BOOL bgselected = NO; | |
27 | + BOOL hasBGImage = [(PTYScrollView *)[self enclosingScrollView] backgroundImage] != nil; | |
28 | + | |
29 | +@@ -816,6 +817,7 @@ static BOOL tigerOrLater; | |
30 | + // Contiguous sections of background with the same colour | |
31 | + // are combined into runs and draw as one operation | |
32 | + bgstart = -1; | |
33 | ++ bgwidth = 0; | |
34 | + j = 0; | |
35 | + while(j <= WIDTH) { | |
36 | + selected = [self _isCharSelectedInRow:line col:j checkOld:NO]; | |
37 | +@@ -826,22 +828,26 @@ static BOOL tigerOrLater; | |
38 | + (dirty && dirty[j]) || | |
39 | + (theLine[j].fg_color & BLINK_MASK) | |
40 | + ); | |
41 | ++ double_width = j<WIDTH-1 && (theLine[j+1].ch == 0xffff); | |
42 | + | |
43 | + if(need_draw && bgstart < 0) { | |
44 | + // Start new run | |
45 | + bgstart = j; | |
46 | ++ bgwidth = 0; | |
47 | + bgcode = theLine[j].bg_color; | |
48 | + bgselected = selected; | |
49 | + } | |
50 | + | |
51 | + if(need_draw && bgselected == selected && theLine[j].bg_color == bgcode) { | |
52 | + // Continue the run | |
53 | ++ bgwidth += double_width ? 2 : 1; | |
54 | + j++; | |
55 | + } | |
56 | + else if(bgstart >= 0) { | |
57 | + // This run is finished, draw it | |
58 | +- bgRect = NSMakeRect(floor(curX+bgstart*charWidth),curY-lineHeight,ceil((j-bgstart)*charWidth),lineHeight); | |
59 | ++ bgRect = NSMakeRect(floor(curX+bgstart*charWidth),curY-lineHeight,ceil(bgwidth*charWidth),lineHeight); | |
60 | + bgstart = -1; | |
61 | ++ bgwidth = 0; | |
62 | + | |
63 | + if(hasBGImage) { | |
64 | + [(PTYScrollView *)[self enclosingScrollView] drawBackgroundImageRect: bgRect]; | |
65 | +@@ -855,6 +861,7 @@ static BOOL tigerOrLater; | |
66 | + } | |
67 | + else { | |
68 | + // Don't need to draw and not on a run, move to next char | |
69 | ++ bgwidth += double_width ? 2 : 1; | |
70 | + j++; | |
71 | + } | |
72 | + } | |
73 | +@@ -2542,12 +2549,12 @@ static BOOL tigerOrLater; | |
74 | + | |
75 | + | |
76 | + crap = [NSString stringWithCharacters:&code length:1]; | |
77 | +- [crap drawAtPoint:NSMakePoint(X,Y-lineHeight) withAttributes:attrib]; | |
78 | ++ [crap drawAtPoint:NSMakePoint(X,Y-lineHeight*(dw?1.0f:1.25f)) withAttributes:attrib]; | |
79 | + | |
80 | + // on older systems, for bold, redraw the character offset by 1 pixel | |
81 | + if (renderBold && (!tigerOrLater || !antiAlias)) | |
82 | + { | |
83 | +- [crap drawAtPoint:NSMakePoint(X+1,Y-lineHeight) withAttributes:attrib]; | |
84 | ++ [crap drawAtPoint:NSMakePoint(X+1,Y-lineHeight*(dw?1.0f:1.25f)) withAttributes:attrib]; | |
85 | + } | |
86 | + } | |
87 | + |