mirror of
https://github.com/macvim-dev/macvim.git
synced 2026-06-11 15:37:29 +02:00
Fix cursor blinking in insert mode.
Calls to draw text with the DRAW_TRANSP flag were ignored. By not ignoring these calls the background of the cursor is erased also in insert mode so that blinking works.
This commit is contained in:
@@ -199,10 +199,6 @@
|
||||
// row, col, flags, fg, bg, sp);
|
||||
[self lazyResize:NO];
|
||||
|
||||
// TODO: support DRAW_TRANSP
|
||||
if (flags & DRAW_TRANSP)
|
||||
return;
|
||||
|
||||
if (row < 0 || row >= maxRows || col < 0 || col >= maxColumns
|
||||
|| col+[string length] > maxColumns) {
|
||||
//NSLog(@"[%s] WARNING : out of range, row=%d (%d) col=%d (%d) "
|
||||
@@ -242,6 +238,16 @@
|
||||
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,
|
||||
|
||||
Reference in New Issue
Block a user