mirror of
https://github.com/vim/vim.git
synced 2025-09-25 03:54:15 -04:00
patch 8.0.1422: no fallback to underline when undercurl is not set
Problem: No fallback to underline when undercurl is not set. (Ben Jackson) Solution: Check for the value to be empty instead of NULL. (closes #2424)
This commit is contained in:
20
src/screen.c
20
src/screen.c
@@ -8041,7 +8041,7 @@ screen_start_highlight(int attr)
|
|||||||
else
|
else
|
||||||
attr = aep->ae_attr;
|
attr = aep->ae_attr;
|
||||||
}
|
}
|
||||||
if ((attr & HL_BOLD) && T_MD != NULL) /* bold */
|
if ((attr & HL_BOLD) && *T_MD != NUL) /* bold */
|
||||||
out_str(T_MD);
|
out_str(T_MD);
|
||||||
else if (aep != NULL && cterm_normal_fg_bold &&
|
else if (aep != NULL && cterm_normal_fg_bold &&
|
||||||
#ifdef FEAT_TERMGUICOLORS
|
#ifdef FEAT_TERMGUICOLORS
|
||||||
@@ -8056,19 +8056,19 @@ screen_start_highlight(int attr)
|
|||||||
/* If the Normal FG color has BOLD attribute and the new HL
|
/* If the Normal FG color has BOLD attribute and the new HL
|
||||||
* has a FG color defined, clear BOLD. */
|
* has a FG color defined, clear BOLD. */
|
||||||
out_str(T_ME);
|
out_str(T_ME);
|
||||||
if ((attr & HL_STANDOUT) && T_SO != NULL) /* standout */
|
if ((attr & HL_STANDOUT) && *T_SO != NUL) /* standout */
|
||||||
out_str(T_SO);
|
out_str(T_SO);
|
||||||
if ((attr & HL_UNDERCURL) && T_UCS != NULL) /* undercurl */
|
if ((attr & HL_UNDERCURL) && *T_UCS != NUL) /* undercurl */
|
||||||
out_str(T_UCS);
|
out_str(T_UCS);
|
||||||
if (((attr & HL_UNDERLINE) /* underline or undercurl */
|
if (((attr & HL_UNDERLINE) /* underline or undercurl */
|
||||||
|| ((attr & HL_UNDERCURL) && T_UCS == NULL))
|
|| ((attr & HL_UNDERCURL) && *T_UCS == NUL))
|
||||||
&& T_US != NULL)
|
&& *T_US != NUL)
|
||||||
out_str(T_US);
|
out_str(T_US);
|
||||||
if ((attr & HL_ITALIC) && T_CZH != NULL) /* italic */
|
if ((attr & HL_ITALIC) && *T_CZH != NUL) /* italic */
|
||||||
out_str(T_CZH);
|
out_str(T_CZH);
|
||||||
if ((attr & HL_INVERSE) && T_MR != NULL) /* inverse (reverse) */
|
if ((attr & HL_INVERSE) && *T_MR != NUL) /* inverse (reverse) */
|
||||||
out_str(T_MR);
|
out_str(T_MR);
|
||||||
if ((attr & HL_STRIKETHROUGH) && T_STS != NULL) /* strike */
|
if ((attr & HL_STRIKETHROUGH) && *T_STS != NUL) /* strike */
|
||||||
out_str(T_STS);
|
out_str(T_STS);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -8180,7 +8180,7 @@ screen_stop_highlight(void)
|
|||||||
else
|
else
|
||||||
out_str(T_SE);
|
out_str(T_SE);
|
||||||
}
|
}
|
||||||
if ((screen_attr & HL_UNDERCURL) && T_UCE != NULL)
|
if ((screen_attr & HL_UNDERCURL) && *T_UCE != NUL)
|
||||||
{
|
{
|
||||||
if (STRCMP(T_UCE, T_ME) == 0)
|
if (STRCMP(T_UCE, T_ME) == 0)
|
||||||
do_ME = TRUE;
|
do_ME = TRUE;
|
||||||
@@ -8188,7 +8188,7 @@ screen_stop_highlight(void)
|
|||||||
out_str(T_UCE);
|
out_str(T_UCE);
|
||||||
}
|
}
|
||||||
if ((screen_attr & HL_UNDERLINE)
|
if ((screen_attr & HL_UNDERLINE)
|
||||||
|| ((screen_attr & HL_UNDERCURL) && T_UCE == NULL))
|
|| ((screen_attr & HL_UNDERCURL) && *T_UCE == NUL))
|
||||||
{
|
{
|
||||||
if (STRCMP(T_UE, T_ME) == 0)
|
if (STRCMP(T_UE, T_ME) == 0)
|
||||||
do_ME = TRUE;
|
do_ME = TRUE;
|
||||||
|
@@ -771,6 +771,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
1422,
|
||||||
/**/
|
/**/
|
||||||
1421,
|
1421,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user