mirror of
https://github.com/vim/vim.git
synced 2025-09-28 04:24:06 -04:00
patch 9.0.0007: no support for double, dotted and dashed underlines
Problem: No support for double, dotted and dashed underlines. Solution: Add the termcap entries and highlight modes. (closes #9553)
This commit is contained in:
22
src/screen.c
22
src/screen.c
@@ -1855,8 +1855,17 @@ screen_start_highlight(int attr)
|
||||
out_str(T_SO);
|
||||
if ((attr & HL_UNDERCURL) && *T_UCS != NUL) // undercurl
|
||||
out_str(T_UCS);
|
||||
if (((attr & HL_UNDERLINE) // underline or undercurl
|
||||
|| ((attr & HL_UNDERCURL) && *T_UCS == NUL))
|
||||
if ((attr & HL_UNDERDOUBLE) && *T_USS != NUL) // double underline
|
||||
out_str(T_USS);
|
||||
if ((attr & HL_UNDERDOTTED) && *T_DS != NUL) // dotted underline
|
||||
out_str(T_DS);
|
||||
if ((attr & HL_UNDERDASHED) && *T_CDS != NUL) // dashed underline
|
||||
out_str(T_CDS);
|
||||
if (((attr & HL_UNDERLINE) // underline or undercurl, etc.
|
||||
|| ((attr & HL_UNDERCURL) && *T_UCS == NUL)
|
||||
|| ((attr & HL_UNDERDOUBLE) && *T_USS == NUL)
|
||||
|| ((attr & HL_UNDERDOTTED) && *T_DS == NUL)
|
||||
|| ((attr & HL_UNDERDASHED) && *T_CDS == NUL))
|
||||
&& *T_US != NUL)
|
||||
out_str(T_US);
|
||||
if ((attr & HL_ITALIC) && *T_CZH != NUL) // italic
|
||||
@@ -1951,6 +1960,8 @@ screen_stop_highlight(void)
|
||||
else
|
||||
#endif
|
||||
{
|
||||
int is_under;
|
||||
|
||||
if (screen_attr > HL_ALL) // special HL attr.
|
||||
{
|
||||
attrentry_T *aep;
|
||||
@@ -2030,15 +2041,16 @@ screen_stop_highlight(void)
|
||||
else
|
||||
out_str(T_SE);
|
||||
}
|
||||
if ((screen_attr & HL_UNDERCURL) && *T_UCE != NUL)
|
||||
is_under = (screen_attr & (HL_UNDERCURL
|
||||
| HL_UNDERDOUBLE | HL_UNDERDOTTED | HL_UNDERDASHED));
|
||||
if (is_under && *T_UCE != NUL)
|
||||
{
|
||||
if (STRCMP(T_UCE, T_ME) == 0)
|
||||
do_ME = TRUE;
|
||||
else
|
||||
out_str(T_UCE);
|
||||
}
|
||||
if ((screen_attr & HL_UNDERLINE)
|
||||
|| ((screen_attr & HL_UNDERCURL) && *T_UCE == NUL))
|
||||
if ((screen_attr & HL_UNDERLINE) || (is_under && *T_UCE == NUL))
|
||||
{
|
||||
if (STRCMP(T_UE, T_ME) == 0)
|
||||
do_ME = TRUE;
|
||||
|
Reference in New Issue
Block a user