|
45 | 45 | // TODO: What does DRAW_TRANSP flag do? If the background isn't drawn when
|
46 | 46 | // this flag is set, then sometimes the character after the cursor becomes
|
47 | 47 | // blank. Everything seems to work fine by just ignoring this flag.
|
48 |
| -#define DRAW_TRANSP 0x01 /* draw with transparant bg */ |
49 |
| -#define DRAW_BOLD 0x02 /* draw bold text */ |
50 |
| -#define DRAW_UNDERL 0x04 /* draw underline text */ |
51 |
| -#define DRAW_UNDERC 0x08 /* draw undercurl text */ |
52 |
| -#define DRAW_ITALIC 0x10 /* draw italic text */ |
| 48 | +#define DRAW_TRANSP 0x01 // draw with transparent bg |
| 49 | +#define DRAW_BOLD 0x02 // draw bold text |
| 50 | +#define DRAW_UNDERL 0x04 // draw underline text |
| 51 | +#define DRAW_UNDERC 0x08 // draw undercurl text |
| 52 | +#define DRAW_ITALIC 0x10 // draw italic text |
53 | 53 | #define DRAW_CURSOR 0x20
|
54 |
| -#define DRAW_WIDE 0x80 /* draw wide text */ |
| 54 | +#define DRAW_STRIKE 0x40 // draw strikethrough text |
| 55 | +#define DRAW_UNDERDOUBLE 0x80 // draw double underline |
| 56 | +#define DRAW_UNDERDOTTED 0x100 // draw dotted underline |
| 57 | +#define DRAW_UNDERDASHED 0x200 // draw dashed underline |
| 58 | +#define DRAW_WIDE 0x1000 // (MacVim only) draw wide text |
| 59 | +#define DRAW_COMP 0x2000 // (MacVim only) drawing composing char |
55 | 60 |
|
56 | 61 |
|
57 | 62 | static NSString *MMWideCharacterAttributeName = @"MMWideChar";
|
@@ -321,6 +326,12 @@ - (void)drawString:(NSString *)string atRow:(int)row column:(int)col
|
321 | 326 | [attributes setObject:value forKey:NSUnderlineStyleAttributeName];
|
322 | 327 | }
|
323 | 328 |
|
| 329 | + if (flags & DRAW_STRIKE) { |
| 330 | + NSNumber *value = [NSNumber numberWithInt:(NSUnderlineStyleSingle |
| 331 | + | NSUnderlinePatternSolid)]; // | NSUnderlineByWordMask |
| 332 | + [attributes setObject:value forKey:NSStrikethroughStyleAttributeName]; |
| 333 | + } |
| 334 | + |
324 | 335 | if (flags & DRAW_UNDERC) {
|
325 | 336 | // TODO: figure out how do draw proper undercurls
|
326 | 337 | NSNumber *value = [NSNumber numberWithInt:(NSUnderlineStyleThick
|
|
0 commit comments