0
0
mirror of https://github.com/vim/vim.git synced 2025-10-04 05:25:06 -04:00

patch 8.0.1038: strike-through text not supported

Problem:    Strike-through text not supported.
Solution:   Add support for the "strikethrough" attribute. (Christian
            Brabandt, Ken Takata)
This commit is contained in:
Bram Moolenaar
2017-09-02 18:33:56 +02:00
parent da22b8cc8b
commit cf4b00c856
18 changed files with 107 additions and 20 deletions

View File

@@ -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)
{