Ignore DRAW_TRANSP flag.

This flag is supposed to indicate that the background should be "transparent".
However, not setting the background color leads to a rendering artifact where
the character after the cursor sometimes is not drawn.  Simply ignoring the
DRAW_TRANSP flag takes care of this bug.
This commit is contained in:
Bjorn Winckler
2007-10-26 19:51:47 +02:00
parent 85313038f6
commit 4de2a14060
2 changed files with 4 additions and 12 deletions
+3 -11
View File
@@ -14,7 +14,9 @@
// TODO: support DRAW_TRANSP flag
// TODO: What does DRAW_TRANSP flag do? If the background isn't drawn when
// this flag is set, then sometimes the character after the cursor becomes
// blank. Everything seems to work fine by just ignoring this flag.
#define DRAW_TRANSP 0x01 /* draw with transparant bg */
#define DRAW_BOLD 0x02 /* draw bold text */
#define DRAW_UNDERL 0x04 /* draw underline text */
@@ -238,16 +240,6 @@
sp, NSUnderlineColorAttributeName,
[NSNumber numberWithFloat:2],NSBaselineOffsetAttributeName,
nil];
} else if (flags & DRAW_TRANSP) {
// Don't include background color when DRAW_TRANSP is set.
//
// NOTE: I'm not sure what the point of this is, but if DRAW_TRANSP
// calls are ignored, then cursor blinking in insert mode doesn't work.
attributes = [NSDictionary dictionaryWithObjectsAndKeys:
theFont, NSFontAttributeName,
fg, NSForegroundColorAttributeName,
sp, NSUnderlineColorAttributeName,
nil];
} else {
attributes = [NSDictionary dictionaryWithObjectsAndKeys:
theFont, NSFontAttributeName,
+1 -1
View File
@@ -451,7 +451,7 @@ NSMutableArray *buildMenuAddress(NSMenu *menu)
// We only want to set the window title if this resize came from
// a live-resize, not (for example) setting 'columns' or 'lines'.
if ([[self textView] inLiveResize]) {
[win setTitle:[NSString stringWithFormat:@"%dx%d",
[win setTitle:[NSString stringWithFormat:@"%dx%d",
dim[1], dim[0]]];
}
}