summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--runtime/doc/builtin.txt1
-rw-r--r--src/evalfunc.c7
-rw-r--r--src/testdir/test_syn_attr.vim4
-rw-r--r--src/version.c2
4 files changed, 11 insertions, 3 deletions
diff --git a/runtime/doc/builtin.txt b/runtime/doc/builtin.txt
index f700d4e9d..a65f60d41 100644
--- a/runtime/doc/builtin.txt
+++ b/runtime/doc/builtin.txt
@@ -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.
diff --git a/src/evalfunc.c b/src/evalfunc.c
index 1505418fb..9b09caab7 100644
--- a/src/evalfunc.c
+++ b/src/evalfunc.c
@@ -10083,8 +10083,11 @@ f_synIDattr(typval_T *argvars UNUSED, typval_T *rettv)
p = highlight_has_attr(id, HL_ITALIC, modec);
break;
- case 'n': // name
- p = get_highlight_name_ext(NULL, id - 1, FALSE);
+ 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;
case 'r': // reverse
diff --git a/src/testdir/test_syn_attr.vim b/src/testdir/test_syn_attr.vim
index 366f39f46..bf4dfbcaf 100644
--- a/src/testdir/test_syn_attr.vim
+++ b/src/testdir/test_syn_attr.vim
@@ -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'))
diff --git a/src/version.c b/src/version.c
index c3b5b6520..3ba672db5 100644
--- a/src/version.c
+++ b/src/version.c
@@ -736,6 +736,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 111,
+/**/
110,
/**/
109,