Skip to content

Commit 8b9e20a

Browse files
committed
patch 8.0.1358: undercurl is not used in the terminal
Problem: Undercurl is not used in the terminal. (Kovid Goyal) Solution: Only fall back to underline when undercurl highlighting is not defined. (closes #1306)
1 parent 1a2ab99 commit 8b9e20a

2 files changed

Lines changed: 16 additions & 3 deletions

File tree

src/screen.c

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8058,8 +8058,11 @@ screen_start_highlight(int attr)
80588058
out_str(T_ME);
80598059
if ((attr & HL_STANDOUT) && T_SO != NULL) /* standout */
80608060
out_str(T_SO);
8061-
if ((attr & (HL_UNDERLINE | HL_UNDERCURL)) && T_US != NULL)
8062-
/* underline or undercurl */
8061+
if ((attr & HL_UNDERCURL) && T_UCS != NULL) /* undercurl */
8062+
out_str(T_UCS);
8063+
if (((attr & HL_UNDERLINE) /* underline or undercurl */
8064+
|| ((attr & HL_UNDERCURL) && T_UCS == NULL))
8065+
&& T_US != NULL)
80638066
out_str(T_US);
80648067
if ((attr & HL_ITALIC) && T_CZH != NULL) /* italic */
80658068
out_str(T_CZH);
@@ -8177,7 +8180,15 @@ screen_stop_highlight(void)
81778180
else
81788181
out_str(T_SE);
81798182
}
8180-
if (screen_attr & (HL_UNDERLINE | HL_UNDERCURL))
8183+
if ((screen_attr & HL_UNDERCURL) && T_UCE != NULL)
8184+
{
8185+
if (STRCMP(T_UCE, T_ME) == 0)
8186+
do_ME = TRUE;
8187+
else
8188+
out_str(T_UCE);
8189+
}
8190+
if ((screen_attr & HL_UNDERLINE)
8191+
|| ((screen_attr & HL_UNDERCURL) && T_UCE == NULL))
81818192
{
81828193
if (STRCMP(T_UE, T_ME) == 0)
81838194
do_ME = TRUE;

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -771,6 +771,8 @@ static char *(features[]) =
771771

772772
static int included_patches[] =
773773
{ /* Add new patch number below this line */
774+
/**/
775+
1358,
774776
/**/
775777
1357,
776778
/**/

0 commit comments

Comments
 (0)