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:
Bjorn Winckler
2007-10-20 13:51:21 +02:00
parent 592d5b8af1
commit 552088f0b9
+10 -4
View File
@@ -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,