vim-patch:8.2.2761: using "syn include" does not work properly

Problem:    Using "syn include" does not work properly.
Solution:   Don't add current_syn_inc_tag to topgrp. (Jaehwang Jerry Jung,
            closes vim/vim#8104)
2e240bd428

Cherry-pick AssertHighlightGroups from patch v8.2.2068.
This commit is contained in:
Jan Edmund Lazo
2021-04-14 08:53:25 -04:00
parent eb93399d70
commit 7d3f31c064
2 changed files with 56 additions and 7 deletions

View File

@@ -5306,13 +5306,17 @@ get_id_list(
xfree(name);
break;
}
if (name[1] == 'A')
id = SYNID_ALLBUT;
else if (name[1] == 'T')
id = SYNID_TOP;
else
id = SYNID_CONTAINED;
id += current_syn_inc_tag;
if (name[1] == 'A') {
id = SYNID_ALLBUT + current_syn_inc_tag;
} else if (name[1] == 'T') {
if (curwin->w_s->b_syn_topgrp >= SYNID_CLUSTER) {
id = curwin->w_s->b_syn_topgrp;
} else {
id = SYNID_TOP + current_syn_inc_tag;
}
} else {
id = SYNID_CONTAINED + current_syn_inc_tag;
}
} else if (name[1] == '@') {
if (skip) {
id = -1;