1
0
forked from aniani/vim

patch 9.0.0144: text property cannot override 'cursorline' highlight

Problem:    Text property cannot override 'cursorline' highlight.
Solution:   Add the "override" flag to prop_type_add(). (closes #5533,
            closes #8225).
This commit is contained in:
Bram Moolenaar
2022-08-05 17:05:04 +01:00
parent afd2aa79ed
commit f4ba8bc47e
7 changed files with 65 additions and 2 deletions

View File

@@ -238,9 +238,10 @@ prop_add_one(
goto theend;
((char_u **)gap->ga_data)[gap->ga_len++] = text;
// change any Tab to a Space to make it simpler to compute the size
// change any control character (Tab, Newline, etc.) to a Space to make
// it simpler to compute the size
for (p = text; *p != NUL; MB_PTR_ADV(p))
if (*p == TAB)
if (*p < ' ')
*p = ' ';
text = NULL;
}
@@ -1542,6 +1543,15 @@ prop_type_set(typval_T *argvars, int add)
prop->pt_flags &= ~PT_FLAG_COMBINE;
}
di = dict_find(dict, (char_u *)"override", -1);
if (di != NULL)
{
if (tv_get_bool(&di->di_tv))
prop->pt_flags |= PT_FLAG_OVERRIDE;
else
prop->pt_flags &= ~PT_FLAG_OVERRIDE;
}
di = dict_find(dict, (char_u *)"priority", -1);
if (di != NULL)
prop->pt_priority = tv_get_number(&di->di_tv);