• R/O
  • HTTP
  • SSH
  • HTTPS

MacPorts: Commit

My MacPorts


Commit MetaInfo

Revisionac3f03b098a43b3f71ca02c90a4680b2b1e00eef (tree)
Time2009-03-14 18:23:40
AuthorKazuki Sakamoto <sakamoto@splh...>
CommiterKazuki Sakamoto

Log Message

iTerm svn trunk r1714 with fixing drawRect

Change Summary

Incremental Difference

--- a/Readme.txt
+++ b/Readme.txt
@@ -1,5 +1,5 @@
11 ctags @5.6j1_1 (active)
22 fmdiff @7819_0 (active)
3- iTerm @0.9.6_20090313 (active)
3+ iTerm @0.9.6_20090314 (active)
44 vim @7.2.132_0+cscope+gdb+huge+my+ruby (active)
55 zsh-devel @4.3.9_1+cjk+mp_completion+pcre (active)
--- a/aqua/iTerm/Portfile
+++ b/aqua/iTerm/Portfile
@@ -3,7 +3,7 @@
33 PortSystem 1.0
44 name iTerm
55 version 0.9.6
6-revision 20090313
6+revision 20090314
77 categories aqua shells
88 maintainers waqar@macports.org
99 description Enhanced terminal emulator program for Mac OS X
@@ -21,7 +21,7 @@ distfiles
2121 patchfiles-append patch-PTYSession.m patch-PTYTextView.m
2222 fetch.type svn
2323 svn.url https://iterm.svn.sourceforge.net/svnroot/iterm/trunk iTerm
24-svn.tag 1713
24+svn.tag 1714
2525
2626 worksrcdir ${name}
2727 use_configure no
--- a/aqua/iTerm/files/patch-PTYTextView.m
+++ b/aqua/iTerm/files/patch-PTYTextView.m
@@ -1,7 +1,7 @@
11 --- PTYTextView.m
22 +++ PTYTextView.m
3-@@ -89,7 +89,7 @@
4-
3+@@ -92,7 +92,7 @@ static BOOL tigerOrLater;
4+
55 [self setMarkedTextAttributes:
66 [NSDictionary dictionaryWithObjectsAndKeys:
77 - [NSColor yellowColor], NSBackgroundColorAttributeName,
@@ -9,7 +9,7 @@
99 [NSColor blackColor], NSForegroundColorAttributeName,
1010 nafont, NSFontAttributeName,
1111 [NSNumber numberWithInt:2],NSUnderlineStyleAttributeName,
12-@@ -493,7 +493,7 @@
12+@@ -444,7 +444,7 @@ static BOOL tigerOrLater;
1313 nafont=naFont;
1414 [self setMarkedTextAttributes:
1515 [NSDictionary dictionaryWithObjectsAndKeys:
@@ -18,3 +18,70 @@
1818 [NSColor blackColor], NSForegroundColorAttributeName,
1919 nafont, NSFontAttributeName,
2020 [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+
Show on old repository browser