0
0
mirror of https://github.com/vim/vim.git synced 2025-09-27 04:14:06 -04:00

patch 9.0.0111: "nocombine" is missing from synIDattr()

Problem:    "nocombine" is missing from synIDattr().
Solution:   Add "nocombine". (Muni Tanjim, closes #10816)
This commit is contained in:
Bram Moolenaar
2022-07-30 14:56:17 +01:00
parent ddab3ce345
commit de78632c41
4 changed files with 11 additions and 3 deletions

View File

@@ -9233,6 +9233,7 @@ synIDattr({synID}, {what} [, {mode}]) *synIDattr()*
"underline" "1" if underlined
"undercurl" "1" if undercurled
"strike" "1" if strikethrough
"nocombine" "1" if nocombine
Returns an empty string on error.

View File

@@ -10083,7 +10083,10 @@ f_synIDattr(typval_T *argvars UNUSED, typval_T *rettv)
p = highlight_has_attr(id, HL_ITALIC, modec);
break;
case 'n': // name
case 'n':
if (TOLOWER_ASC(what[1]) == 'o') // nocombine
p = highlight_has_attr(id, HL_NOCOMBINE, modec);
else // name
p = get_highlight_name_ext(NULL, id - 1, FALSE);
break;

View File

@@ -22,8 +22,10 @@ func Test_missing_attr()
call assert_equal('1', synIDattr(hlID("Mine"), "underdotted", 'cterm'))
call assert_equal('1', synIDattr("Mine"->hlID(), "underdashed", 'gui'))
hi Mine gui=strikethrough
hi Mine term=nocombine gui=strikethrough
call assert_equal('1', synIDattr(hlID("Mine"), "strikethrough", 'gui'))
call assert_equal('1', synIDattr(hlID("Mine"), "nocombine", 'term'))
call assert_equal('', synIDattr(hlID("Mine"), "nocombine", 'gui'))
hi Mine term=NONE cterm=NONE gui=NONE
call assert_equal('', synIDattr(hlID("Mine"), "bold", 'term'))
call assert_equal('', synIDattr(hlID("Mine"), "italic", 'cterm'))

View File

@@ -735,6 +735,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
111,
/**/
110,
/**/