diff options
author | Bram Moolenaar <Bram@vim.org> | 2017-09-02 18:33:56 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2017-09-02 18:33:56 +0200 |
commit | cf4b00c856ef714482d8d060332ac9a4d74e6b88 (patch) | |
tree | a17efb73ba6cffbdc8c17adbec2152ac41c35803 /src/gui_w32.c | |
parent | da22b8cc8b1b96fabd5a4c35c57b04a351340fb1 (diff) | |
download | vim-git-cf4b00c856ef714482d8d060332ac9a4d74e6b88.tar.gz |
patch 8.0.1038: strike-through text not supportedv8.0.1038
Problem: Strike-through text not supported.
Solution: Add support for the "strikethrough" attribute. (Christian
Brabandt, Ken Takata)
Diffstat (limited to 'src/gui_w32.c')
-rw-r--r-- | src/gui_w32.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/gui_w32.c b/src/gui_w32.c index e94379ba7..c4a57e675 100644 --- a/src/gui_w32.c +++ b/src/gui_w32.c @@ -6427,6 +6427,18 @@ gui_mch_draw_string( DeleteObject(SelectObject(s_hdc, old_pen)); } + /* Strikethrough */ + if (flags & DRAW_STRIKE) + { + hpen = CreatePen(PS_SOLID, 1, gui.currSpColor); + old_pen = SelectObject(s_hdc, hpen); + y = FILL_Y(row + 1) - gui.char_height/2; + MoveToEx(s_hdc, FILL_X(col), y, NULL); + /* Note: LineTo() excludes the last pixel in the line. */ + LineTo(s_hdc, FILL_X(col + len), y); + DeleteObject(SelectObject(s_hdc, old_pen)); + } + /* Undercurl */ if (flags & DRAW_UNDERC) { |