fix(api): highlight attribute for underline

This commit fixes regression introduced in c365de1 when checking for
highlight attribute for underline was returning '0' when it was present

Fixes #17624.
This commit is contained in:
Kirill Chibisov
2022-03-06 22:56:41 +03:00
parent 3800615da9
commit 96bb1784a6
2 changed files with 12 additions and 5 deletions

View File

@@ -11411,7 +11411,7 @@ static void f_synIDattr(typval_T *argvars, typval_T *rettv, FunPtr fptr)
case 'u': {
const size_t len = STRLEN(what);
if (len <= 5 || (TOLOWER_ASC(what[5]) == 'l' && len <= 9)) { // underline
p = highlight_has_attr(id, HL_UNDERCURL, modec);
p = highlight_has_attr(id, HL_UNDERLINE, modec);
} else if (TOLOWER_ASC(what[5]) == 'c') { // undercurl
p = highlight_has_attr(id, HL_UNDERCURL, modec);
} else if (len > 9 && TOLOWER_ASC(what[9]) == 'l') { // underlineline