summaryrefslogtreecommitdiffstats
path: root/src/gui_w32.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2017-09-02 18:33:56 +0200
committerBram Moolenaar <Bram@vim.org>2017-09-02 18:33:56 +0200
commitcf4b00c856ef714482d8d060332ac9a4d74e6b88 (patch)
treea17efb73ba6cffbdc8c17adbec2152ac41c35803 /src/gui_w32.c
parentda22b8cc8b1b96fabd5a4c35c57b04a351340fb1 (diff)
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.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/gui_w32.c b/src/gui_w32.c
index e94379ba7c..c4a57e675a 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)
{