diff options
author | Bram Moolenaar <Bram@vim.org> | 2005-06-08 22:05:14 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2005-06-08 22:05:14 +0000 |
commit | 3638c6876da2fe86885abfdffdec1436260377fd (patch) | |
tree | d795defeb53be2b5d2ad7cb9b0c107ad6cad59a7 /src/syntax.c | |
parent | f3681cc330d709e85ed21c8c514fcf4c60ff5c09 (diff) | |
download | vim-git-3638c6876da2fe86885abfdffdec1436260377fd.tar.gz |
updated for version 7.0083
Diffstat (limited to 'src/syntax.c')
-rw-r--r-- | src/syntax.c | 28 |
1 files changed, 20 insertions, 8 deletions
diff --git a/src/syntax.c b/src/syntax.c index b4dfed49d..1d8f41bf3 100644 --- a/src/syntax.c +++ b/src/syntax.c @@ -2202,10 +2202,10 @@ syn_current_attr(syncing, displaying, can_spell) * done in the current item. */ - /* If there is no @Spell cluster: Do spelling for items without - * @NoSpell. Otherwise only in items with @Spell */ if (syn_buf->b_spell_cluster_id == 0) { + /* There is no @Spell cluster: Do spelling for items without + * @NoSpell cluster. */ if (syn_buf->b_nospell_cluster_id == 0 || current_trans_id == 0) *can_spell = TRUE; else @@ -2216,14 +2216,26 @@ syn_current_attr(syncing, displaying, can_spell) *can_spell = !in_id_list(sip, sip->si_cont_list, &sps, 0); } } - else if (current_trans_id == 0) - *can_spell = FALSE; else { - sps.inc_tag = 0; - sps.id = syn_buf->b_spell_cluster_id; - sps.cont_in_list = NULL; - *can_spell = in_id_list(sip, sip->si_cont_list, &sps, 0); + /* The @Spell cluster is defined: Do spelling in items with + * the @Spell cluster. But not when @NoSpell is also there. */ + if (current_trans_id == 0) + *can_spell = FALSE; + else + { + sps.inc_tag = 0; + sps.id = syn_buf->b_spell_cluster_id; + sps.cont_in_list = NULL; + *can_spell = in_id_list(sip, sip->si_cont_list, &sps, 0); + + if (syn_buf->b_nospell_cluster_id != 0) + { + sps.id = syn_buf->b_nospell_cluster_id; + if (in_id_list(sip, sip->si_cont_list, &sps, 0)) + *can_spell = FALSE; + } + } } } |