diff options
author | Bram Moolenaar <Bram@vim.org> | 2017-11-28 21:25:21 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2017-11-28 21:25:21 +0100 |
commit | 8b9e20afb0da79a21155988a38704b5777cc2efe (patch) | |
tree | d8df5b171e3f7596da6cdb86b3690d10c558d5bd /src/screen.c | |
parent | 1a2ab991a6d168699fbcc934b63cfc3579c3d34d (diff) | |
download | vim-git-8b9e20afb0da79a21155988a38704b5777cc2efe.tar.gz |
patch 8.0.1358: undercurl is not used in the terminalv8.0.1358
Problem: Undercurl is not used in the terminal. (Kovid Goyal)
Solution: Only fall back to underline when undercurl highlighting is not
defined. (closes #1306)
Diffstat (limited to 'src/screen.c')
-rw-r--r-- | src/screen.c | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/src/screen.c b/src/screen.c index 05853d442..4d277e3c8 100644 --- a/src/screen.c +++ b/src/screen.c @@ -8058,8 +8058,11 @@ screen_start_highlight(int attr) out_str(T_ME); if ((attr & HL_STANDOUT) && T_SO != NULL) /* standout */ out_str(T_SO); - if ((attr & (HL_UNDERLINE | HL_UNDERCURL)) && T_US != NULL) - /* underline or undercurl */ + 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); @@ -8177,7 +8180,15 @@ screen_stop_highlight(void) else out_str(T_SE); } - if (screen_attr & (HL_UNDERLINE | HL_UNDERCURL)) + if ((screen_attr & HL_UNDERCURL) && T_UCE != NULL) + { + 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)) { if (STRCMP(T_UE, T_ME) == 0) do_ME = TRUE; |