diff options
author | Bram Moolenaar <Bram@vim.org> | 2022-08-05 17:05:04 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2022-08-05 17:05:04 +0100 |
commit | f4ba8bc47eb3c6b5899ef31d083b9b8f0d4ca456 (patch) | |
tree | 9266118a1688defde92692244251530573f7da2b /src/textprop.c | |
parent | afd2aa79eda3fe69f2e7c87d0b9b4bca874f386a (diff) | |
download | vim-git-f4ba8bc47eb3c6b5899ef31d083b9b8f0d4ca456.tar.gz |
patch 9.0.0144: text property cannot override 'cursorline' highlightv9.0.0144
Problem: Text property cannot override 'cursorline' highlight.
Solution: Add the "override" flag to prop_type_add(). (closes #5533,
closes #8225).
Diffstat (limited to 'src/textprop.c')
-rw-r--r-- | src/textprop.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/textprop.c b/src/textprop.c index 9a9544c50..86b0dbf88 100644 --- a/src/textprop.c +++ b/src/textprop.c @@ -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); |