Closed thblt closed 7 years ago
Wow, indeed! Thanks for the detailed report.
Functions that correct word before or after the point are using flyspell-overlay-p
which is used to filter out all overlays. I am not sure what is the best way to filter out these overlays, but it seems that there is a special face for duplicate overlays and incorrect words. So I can just filter out 'duplicate' overlays 😸
In case you don't know better solution - I will implement this one till tomorrow.
Sounds good, with a very small edge case: a repeated and misspelled word would be ignored. I haven't dug into flyspell[-correct] code, but wouldn't it be easier (and less dependant on font-locking and/or local buffer idiosyncrasies) to simply skip the word is Flyspell considers it valid?
[1] Focus on previous marked word [=the]
[2] Is the word valid?
[3] Yes -> Goto 1
[4] No ->
[5] run flyspell-correct popup
[6] exit
Using the example sentence above, the process would run: focus on "the", internally verify "the" using flycheck, "the" is valid and should not be corrected (state 4), focus on previous error, focus is now on "sentnece", "sentnece" is not valid, display flyspell-correct popup.
Yeah that makes sense. And looks like a better solution. Thanks.
Sorry for the delay. I have pushed fix. Should be available in MELPA soon. Let me know if I screwed anything 😸
In case everything is fine - I'll release new stable version with this fix.
Just tested the version in Melpa and everything seems fine. Thanks for the fix, and thanks in advance for the tagged release!
Steps to reproduce
Enter this sentence in a random buffer:
Two words are marked by Flyspell (I put them in bold): the obviously misspelled "sentnece" and the duplicated "the" ("the the twelfth"), because Flyspell warns about duplicated words. Trying to run flyspell-correct-ivy with the point at the end of the sentence (or anywhere after the double "the") has absolutely no effect.
Expected behavior
Thanks! Th