# HG changeset patch # User Christian Brabandt # Date 1513973706 -3600 # Node ID 72366f4e326438d966ffa3ab95b64934e11d39fe # Parent 918d328265d54681b95c467f7f184d4625d534f9 patch 8.0.1422: no fallback to underline when undercurl is not set commit https://github.com/vim/vim/commit/45a0000d5c4a5ea934d5a16a2ab5bbcf307623ac Author: Bram Moolenaar Date: Fri Dec 22 21:12:34 2017 +0100 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 https://github.com/vim/vim/issues/2424) diff --git a/src/screen.c b/src/screen.c --- a/src/screen.c +++ b/src/screen.c @@ -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,7 +8180,7 @@ 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; @@ -8188,7 +8188,7 @@ screen_stop_highlight(void) 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; diff --git a/src/version.c b/src/version.c --- a/src/version.c +++ b/src/version.c @@ -772,6 +772,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 1422, +/**/ 1421, /**/ 1420,