mirror of
https://github.com/macvim-dev/macvim.git
synced 2026-06-11 15:37:29 +02:00
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:
@@ -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,
|
||||
|
||||
@@ -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]]];
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user