Permalink
Browse files

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)
  • Loading branch information...
brammool committed Dec 22, 2017
1 parent e6640ad commit 45a0000d5c4a5ea934d5a16a2ab5bbcf307623ac
Showing with 12 additions and 10 deletions.
  1. +10 −10 src/screen.c
  2. +2 −0 src/version.c
View
@@ -8041,7 +8041,7 @@ screen_start_highlight(int attr)
else
attr = aep->ae_attr;
}
if ((attr & HL_BOLD) && T_MD != NULL) /* bold */
if ((attr & HL_BOLD) && *T_MD != NUL) /* bold */
out_str(T_MD);
else if (aep != NULL && cterm_normal_fg_bold &&
#ifdef FEAT_TERMGUICOLORS
@@ -8056,19 +8056,19 @@ screen_start_highlight(int attr)
/* If the Normal FG color has BOLD attribute and the new HL
* has a FG color defined, clear BOLD. */
out_str(T_ME);
if ((attr & HL_STANDOUT) && T_SO != NULL) /* standout */
if ((attr & HL_STANDOUT) && *T_SO != NUL) /* standout */
out_str(T_SO);
if ((attr & HL_UNDERCURL) && T_UCS != NULL) /* undercurl */
if ((attr & HL_UNDERCURL) && *T_UCS != NUL) /* undercurl */
out_str(T_UCS);
if (((attr & HL_UNDERLINE) /* underline or undercurl */
|| ((attr & HL_UNDERCURL) && T_UCS == NULL))
&& T_US != NULL)
|| ((attr & HL_UNDERCURL) && *T_UCS == NUL))
&& *T_US != NUL)
out_str(T_US);
if ((attr & HL_ITALIC) && T_CZH != NULL) /* italic */
if ((attr & HL_ITALIC) && *T_CZH != NUL) /* italic */
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);
if ((attr & HL_STRIKETHROUGH) && T_STS != NULL) /* strike */
if ((attr & HL_STRIKETHROUGH) && *T_STS != NUL) /* strike */
out_str(T_STS);
/*
@@ -8180,15 +8180,15 @@ screen_stop_highlight(void)
else
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)
do_ME = TRUE;
else
out_str(T_UCE);
}
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)
do_ME = TRUE;
View
@@ -771,6 +771,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
1422,
/**/
1421,
/**/

0 comments on commit 45a0000

Please sign in to comment.