On Sat, Aug 24, 2013 at 9:48 PM, Cesar Romani <[email protected]> wrote:
> On 22/08/2013 07:14 a.m., Bram Moolenaar wrote:
>>
>> Cesar Romani wrote:
>>
>>> spellsuggest with 'set sps:file:{filename}' doesn't work.
>>> I'm using vim 7.4.5 on windows 7.
>>> I created a file, say sps.txt, and put there the following lines:
>>>
>>> Enantes/Antes
>>> chaofa/chaufa
>>> aser/hacer
>>> kion/kión
>>> sutra/sūtra
>>>
>>> Suppose I have a file, say test.txt, with the following line:
>>>
>>> Enantes pude aser un chaofa con kion y luego leí un sutra
>>>
>>> I do ':set spell spl=es' and ':set sps=file:sps.txt'
>>>
>>> If I go under the word 'Enantes' or 'aser' and do 'z=' I get the
>>> suggestions from sps.txt.
>>> But if I go under the word 'chaofa' or 'kion' or 'sutra' and do 'z='
>>> I get:
>>> Sorry, no suggestions
>>
>> I can reproduce it. Strange.
>>
>
> I think I found the solution. If I include the words 'chaufa', 'kión'
> and 'sūtra' on a spellfile, say test.utf-8.add, and do
> ':set spf=test.utf-8.add', then when I do 'z=' on 'chaofa', 'kion', or
> 'sutra' I get the suggested words.
The way in which "chaufa" "kión" "sūtra" differ from "Antes" "hacer" is
that they are considered SpellBad by the Spanish spellchecker.
That's why on line 10798 of spell.c check_suggestions() clears them out
as invalid. A possible fix is to simply remove this call: since the user
has explicitly specified a file with suggestions I think we can expect
that the user deems these suggestions valid. I don't know -- can we?
diff -r 2ee5e568766c src/spell.c
--- a/src/spell.c Thu Aug 22 14:14:27 2013 +0200
+++ b/src/spell.c Sat Aug 24 22:03:34 2013 +0200
@@ -10795,7 +10795,6 @@
fclose(fd);
/* Remove bogus suggestions, sort and truncate at "maxcount". */
- check_suggestions(su, &su->su_ga);
(void)cleanup_suggestions(&su->su_ga, su->su_maxscore, su->su_maxcount);
}
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.