Special color is used (underlines now have color)

git-svn-id: http://macvim.googlecode.com/svn/trunk@176 96c4425d-ca35-0410-94e5-3396d5c13a8f
This commit is contained in:
Bjorn Winckler
2007-08-22 16:10:46 +00:00
parent 6a500c45ba
commit 26698eed82
6 changed files with 24 additions and 11 deletions
+2
View File
@@ -24,6 +24,7 @@
BOOL tabBarVisible;
int backgroundColor;
int foregroundColor;
int specialColor;
int defaultBackgroundColor;
int defaultForegroundColor;
NSDate *lastFlushDate;
@@ -34,6 +35,7 @@
- (void)setBackgroundColor:(int)color;
- (void)setForegroundColor:(int)color;
- (void)setSpecialColor:(int)color;
- (void)setDefaultColorsBackground:(int)bg foreground:(int)fg;
- (BOOL)checkin;
+6
View File
@@ -84,6 +84,11 @@ static int specialKeyToNSKey(int key);
foregroundColor = color;
}
- (void)setSpecialColor:(int)color
{
specialColor = color;
}
- (void)setDefaultColorsBackground:(int)bg foreground:(int)fg
{
defaultBackgroundColor = bg;
@@ -239,6 +244,7 @@ static int specialKeyToNSKey(int key);
[drawData appendBytes:&backgroundColor length:sizeof(int)];
[drawData appendBytes:&foregroundColor length:sizeof(int)];
[drawData appendBytes:&specialColor length:sizeof(int)];
[drawData appendBytes:&row length:sizeof(int)];
[drawData appendBytes:&col length:sizeof(int)];
[drawData appendBytes:&flags length:sizeof(int)];
+3 -3
View File
@@ -34,9 +34,9 @@
- (int)maxColumns;
- (void)getMaxRows:(int*)rows columns:(int*)cols;
- (void)setMaxRows:(int)rows columns:(int)cols;
- (void)replaceString:(NSString*)string atRow:(int)row column:(int)col
withFlags:(int)flags foregroundColor:(NSColor*)fg
backgroundColor:(NSColor*)bg;
- (void)replaceString:(NSString *)string atRow:(int)row column:(int)col
withFlags:(int)flags foregroundColor:(NSColor *)fg
backgroundColor:(NSColor *)bg specialColor:(NSColor *)sp;
- (void)deleteLinesFromRow:(int)row lineCount:(int)count
scrollBottom:(int)bottom left:(int)left right:(int)right
color:(NSColor *)color;
+9 -7
View File
@@ -154,9 +154,9 @@
maxColumns = cols;
}
- (void)replaceString:(NSString*)string atRow:(int)row column:(int)col
withFlags:(int)flags foregroundColor:(NSColor*)fg
backgroundColor:(NSColor*)bg
- (void)replaceString:(NSString *)string atRow:(int)row column:(int)col
withFlags:(int)flags foregroundColor:(NSColor *)fg
backgroundColor:(NSColor *)bg specialColor:(NSColor *)sp
{
//NSLog(@"replaceString:atRow:%d column:%d withFlags:%d", row, col, flags);
[self lazyResize];
@@ -169,9 +169,9 @@
return;
}
if (!(fg && bg)) {
NSLog(@"[%s] WARNING: background or foreground color not specified",
_cmd);
if (!(fg && bg && sp)) {
NSLog(@"[%s] WARNING: background, foreground or special color not "
"specified", _cmd);
return;
}
@@ -183,7 +183,9 @@
#if !HEED_DRAW_TRANSP
bg, NSBackgroundColorAttributeName,
#endif
fg, NSForegroundColorAttributeName, nil];
fg, NSForegroundColorAttributeName,
sp, NSUnderlineColorAttributeName,
nil];
[attribString setAttributes:attributes range:range];
#if HEED_DRAW_TRANSP
+3 -1
View File
@@ -770,6 +770,7 @@ static NSMenuItem *findMenuItemWithTagInMenu(NSMenu *root, int tag)
} else if (ReplaceStringDrawType == type) {
int bg = *((int*)bytes); bytes += sizeof(int);
int fg = *((int*)bytes); bytes += sizeof(int);
int sp = *((int*)bytes); bytes += sizeof(int);
int row = *((int*)bytes); bytes += sizeof(int);
int col = *((int*)bytes); bytes += sizeof(int);
int flags = *((int*)bytes); bytes += sizeof(int);
@@ -785,7 +786,8 @@ static NSMenuItem *findMenuItemWithTagInMenu(NSMenu *root, int tag)
atRow:row column:col
withFlags:flags
foregroundColor:[NSColor colorWithRgbInt:fg]
backgroundColor:[NSColor colorWithRgbInt:bg]];
backgroundColor:[NSColor colorWithRgbInt:bg]
specialColor:[NSColor colorWithRgbInt:sp]];
[string release];
} else if (InsertLinesDrawType == type) {
+1
View File
@@ -1226,6 +1226,7 @@ gui_mch_set_shellsize(
void
gui_mch_set_sp_color(guicolor_T color)
{
[[MMBackend sharedInstance] setSpecialColor:color];
}