1
0
forked from aniani/vim

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

@@ -235,7 +235,7 @@ redraw_later_clear(void)
else
#endif
/* Use attributes that is very unlikely to appear in text. */
screen_attr = HL_BOLD | HL_UNDERLINE | HL_INVERSE;
screen_attr = HL_BOLD | HL_UNDERLINE | HL_INVERSE | HL_STRIKETHROUGH;
}
/*
@@ -8086,6 +8086,8 @@ screen_start_highlight(int attr)
out_str(T_CZH);
if ((attr & HL_INVERSE) && T_MR != NULL) /* inverse (reverse) */
out_str(T_MR);
if ((attr & HL_STRIKETHROUGH) && T_STS != NULL) /* strike */
out_str(T_STS);
/*
* Output the color or start string after bold etc., in case the
@@ -8210,6 +8212,13 @@ screen_stop_highlight(void)
else
out_str(T_CZR);
}
if (screen_attr & HL_STRIKETHROUGH)
{
if (STRCMP(T_STE, T_ME) == 0)
do_ME = TRUE;
else
out_str(T_STE);
}
if (do_ME || (screen_attr & (HL_BOLD | HL_INVERSE)))
out_str(T_ME);