To: vim_dev@googlegroups.com Subject: Patch 8.0.1422 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.0.1422 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) Files: src/screen.c *** ../vim-8.0.1421/src/screen.c 2017-12-12 22:29:26.968498598 +0100 --- src/screen.c 2017-12-22 16:41:30.536557208 +0100 *************** *** 8041,8047 **** else attr = aep->ae_attr; } ! if ((attr & HL_BOLD) && T_MD != NULL) /* bold */ out_str(T_MD); else if (aep != NULL && cterm_normal_fg_bold && #ifdef FEAT_TERMGUICOLORS --- 8041,8047 ---- else attr = aep->ae_attr; } ! if ((attr & HL_BOLD) && *T_MD != NUL) /* bold */ out_str(T_MD); else if (aep != NULL && cterm_normal_fg_bold && #ifdef FEAT_TERMGUICOLORS *************** *** 8056,8074 **** /* 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 */ out_str(T_SO); ! if ((attr & HL_UNDERCURL) && T_UCS != NULL) /* undercurl */ out_str(T_UCS); if (((attr & HL_UNDERLINE) /* underline or undercurl */ ! || ((attr & HL_UNDERCURL) && T_UCS == NULL)) ! && T_US != NULL) out_str(T_US); ! if ((attr & HL_ITALIC) && T_CZH != NULL) /* italic */ 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); /* --- 8056,8074 ---- /* 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 != NUL) /* standout */ 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)) ! && *T_US != NUL) out_str(T_US); ! if ((attr & HL_ITALIC) && *T_CZH != NUL) /* italic */ out_str(T_CZH); ! if ((attr & HL_INVERSE) && *T_MR != NUL) /* inverse (reverse) */ out_str(T_MR); ! if ((attr & HL_STRIKETHROUGH) && *T_STS != NUL) /* strike */ out_str(T_STS); /* *************** *** 8180,8186 **** else out_str(T_SE); } ! if ((screen_attr & HL_UNDERCURL) && T_UCE != NULL) { if (STRCMP(T_UCE, T_ME) == 0) do_ME = TRUE; --- 8180,8186 ---- else out_str(T_SE); } ! if ((screen_attr & HL_UNDERCURL) && *T_UCE != NUL) { if (STRCMP(T_UCE, T_ME) == 0) do_ME = TRUE; *************** *** 8188,8194 **** out_str(T_UCE); } if ((screen_attr & HL_UNDERLINE) ! || ((screen_attr & HL_UNDERCURL) && T_UCE == NULL)) { if (STRCMP(T_UE, T_ME) == 0) do_ME = TRUE; --- 8188,8194 ---- out_str(T_UCE); } if ((screen_attr & HL_UNDERLINE) ! || ((screen_attr & HL_UNDERCURL) && *T_UCE == NUL)) { if (STRCMP(T_UE, T_ME) == 0) do_ME = TRUE; *** ../vim-8.0.1421/src/version.c 2017-12-22 21:05:45.013328950 +0100 --- src/version.c 2017-12-22 21:11:53.187432708 +0100 *************** *** 773,774 **** --- 773,776 ---- { /* Add new patch number below this line */ + /**/ + 1422, /**/ -- hundred-and-one symptoms of being an internet addict: 148. You find it easier to dial-up the National Weather Service Weather/your_town/now.html than to simply look out the window. /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///