diff options
author | Bram Moolenaar <Bram@vim.org> | 2020-09-29 20:59:17 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2020-09-29 20:59:17 +0200 |
commit | 391c36279415d0b8c5dba1ba11b668add04be963 (patch) | |
tree | 963cacdf2fa296fba4e1e3c1a52e0b9d0dad5a08 /src/highlight.c | |
parent | d569a9e74684cd17f9cea63e804281388728e513 (diff) |
patch 8.2.1771: synIDattr() cannot get the value of ctermulv8.2.1771
Problem: synIDattr() cannot get the value of ctermul.
Solution: Add the "ul" value for "what". (closes #7037)
Diffstat (limited to 'src/highlight.c')
-rw-r--r-- | src/highlight.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/highlight.c b/src/highlight.c index 0a014473b1..56b1988835 100644 --- a/src/highlight.c +++ b/src/highlight.c @@ -2684,13 +2684,14 @@ highlight_has_attr( char_u * highlight_color( int id, - char_u *what, // "font", "fg", "bg", "sp", "fg#", "bg#" or "sp#" + char_u *what, // "font", "fg", "bg", "sp", "ul", "fg#", "bg#" or "sp#" int modec) // 'g' for GUI, 'c' for cterm, 't' for term { static char_u name[20]; int n; int fg = FALSE; int sp = FALSE; + int ul = FALSE; int font = FALSE; if (id <= 0 || id > highlight_ga.ga_len) @@ -2703,6 +2704,8 @@ highlight_color( font = TRUE; else if (TOLOWER_ASC(what[0]) == 's' && TOLOWER_ASC(what[1]) == 'p') sp = TRUE; + else if (TOLOWER_ASC(what[0]) == 'u' && TOLOWER_ASC(what[1]) == 'l') + ul = TRUE; else if (!(TOLOWER_ASC(what[0]) == 'b' && TOLOWER_ASC(what[1]) == 'g')) return NULL; if (modec == 'g') @@ -2749,6 +2752,8 @@ highlight_color( { if (fg) n = HL_TABLE()[id - 1].sg_cterm_fg - 1; + else if (ul) + n = HL_TABLE()[id - 1].sg_cterm_ul - 1; else n = HL_TABLE()[id - 1].sg_cterm_bg - 1; if (n < 0) |