diff options
author | Bram Moolenaar <Bram@vim.org> | 2005-11-26 23:45:02 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2005-11-26 23:45:02 +0000 |
commit | 5fe38612c99984604bbd95345dc756650c0748c8 (patch) | |
tree | f7af6d84eabad4133b0b1ed1abab833e10929092 /src/gui_mac.c | |
parent | 3d2381ec09ae2218a8323240f4c53b8d02d79bb1 (diff) | |
download | vim-git-5fe38612c99984604bbd95345dc756650c0748c8.tar.gz |
updated for version 7.0160
Diffstat (limited to 'src/gui_mac.c')
-rw-r--r-- | src/gui_mac.c | 33 |
1 files changed, 32 insertions, 1 deletions
diff --git a/src/gui_mac.c b/src/gui_mac.c index 50e96695e..52a24d70d 100644 --- a/src/gui_mac.c +++ b/src/gui_mac.c @@ -4291,13 +4291,41 @@ gui_mch_set_bg_color(color) RGBBackColor(&TheColor); } +RGBColor specialColor; + /* - * Set the current text speail color. TODO + * Set the current text special color. */ void gui_mch_set_sp_color(color) guicolor_T color; { + specialColor.red = Red(color) * 0x0101; + specialColor.green = Green(color) * 0x0101; + specialColor.blue = Blue(color) * 0x0101; +} + +/* + * Draw undercurl at the bottom of the character cell. + */ + static void +draw_undercurl(int flags, int row, int col, int cells) +{ + int i; + int offset; + const static int val[8] = {1, 0, 0, 0, 1, 2, 2, 2 }; + int y = FILL_Y(row + 1) - 1; + + RGBForeColor(&specialColor); + + offset = val[FILL_X(col) % 8]; + MoveTo(FILL_X(col), y - offset); + + for (i = FILL_X(col); i < FILL_X(col + cells); ++i) + { + offset = val[i % 8]; + LineTo(i, y - offset); + } } void @@ -4451,6 +4479,9 @@ gui_mch_draw_string(row, col, s, len, flags) #endif } + if (flags & DRAW_UNDERC) + draw_undercurl(flags, row, col, len); + #ifdef FEAT_MBYTE vim_free(tofree); #endif |