diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2014-12-23 14:42:09 -0500 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2014-12-23 14:42:09 -0500 |
commit | 53b13d2a1854220ed289e07b5bc8443327a6c09c (patch) | |
tree | b53c1d1764648370ac52dbe0d190b9fe69639858 /src/nvim/spell.c | |
parent | e274c5f6223a8b0f1bbd811ad962af3d1ec8aa80 (diff) | |
parent | d5bdc709d06d6d3452dbb7709351a22e6c12597e (diff) | |
download | rneovim-53b13d2a1854220ed289e07b5bc8443327a6c09c.tar.gz rneovim-53b13d2a1854220ed289e07b5bc8443327a6c09c.tar.bz2 rneovim-53b13d2a1854220ed289e07b5bc8443327a6c09c.zip |
Merge pull request #1726 from fwalch/vim-7.4.447
vim-patch:7.4.447
Diffstat (limited to 'src/nvim/spell.c')
-rw-r--r-- | src/nvim/spell.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/nvim/spell.c b/src/nvim/spell.c index 83dcddecd6..4759b4efa6 100644 --- a/src/nvim/spell.c +++ b/src/nvim/spell.c @@ -806,6 +806,7 @@ typedef struct afffile_S { unsigned af_nosuggest; // NOSUGGEST ID int af_pfxpostpone; // postpone prefixes without chop string and // without flags + bool af_ignoreextra; // IGNOREEXTRA present hashtab_T af_pref; // hashtable for prefixes, affheader_T hashtab_T af_suff; // hashtable for suffixes, affheader_T hashtab_T af_comp; // hashtable for compound flags, compitem_T @@ -4629,6 +4630,8 @@ static afffile_T *spell_read_aff(spellinfo_T *spin, char_u *fname) spin->si_nosugfile = true; } else if (is_aff_rule(items, itemcnt, "PFXPOSTPONE", 1)) { aff->af_pfxpostpone = true; + } else if (is_aff_rule(items, itemcnt, "IGNOREEXTRA", 1)) { + aff->af_ignoreextra = true; } else if ((STRCMP(items[0], "PFX") == 0 || STRCMP(items[0], "SFX") == 0) && aff_todo == 0 @@ -4692,8 +4695,11 @@ static afffile_T *spell_read_aff(spellinfo_T *spin, char_u *fname) cur_aff->ah_follows = false; // Myspell allows extra text after the item, but that might - // mean mistakes go unnoticed. Require a comment-starter. - if (itemcnt > lasti && *items[lasti] != '#') + // mean mistakes go unnoticed. Require a comment-starter, + // unless IGNOREEXTRA is used. Hunspell uses a "-" item. + if (itemcnt > lasti + && !aff->af_ignoreextra + && *items[lasti] != '#') smsg((char_u *)_(e_afftrailing), fname, lnum, items[lasti]); if (STRCMP(items[2], "Y") != 0 && STRCMP(items[2], "N") != 0) |