Open PaulEcoffet opened 7 years ago
Thank you for the bug report. I'll look into it.
I have not been able to reproduce this yet. Can you send me a file demonstrating the issue? Also, what OS are you on?
I was at the office when I noticed the bug and we use Ubuntu 14.04 there. I tried to reproduce it at home with Ubuntu 16.10 and the bug was not present anymore. It might be due of a old version of hunspell that I am running there. I will investigate it more next week.
Not sure if I should raise another issue or if its closely enough to this to include here but I get a problem with shifting for non-multibyte characters so long as the length of correction differs from the length of text being corrected. Take the following example of a text document with contents:
I cannt spel goood.
As you correct from left to right (without saving in between), the later corrections get inserted into the wrong position. Since correcting the first one adds a character when correcting the second word, the correction is inserted one character to the left compounding as you correct mistakes from left to right. The same problem happens if the corrections had more characters than the mistake. When a correction is made, the offset of all other corrections to be made needs to be updated to reflect the characters that were inserted or removed.
This may be resolved with #26, also resolving the fact the correction is highlighted as an error until another save is performed. This also seems to occur if you type or delete anything without saving. Even if spellchecking is not re-run, the offsets should be updated for every insertion or deletion.
Good evening,
I have started to write a text in French in utf-8, and when I type an accent, every misspelled word after it are slightly shifted to the right.
As you can see, linter-spell says that "alde" is misspelled and not "malde" as hunspell says in terminal mode.
If I type two accents, the shift is one character bigger :
It seems that there is an issue in characters counts between hunspell and linter-spell for multibyte characters.
Thank you for your help.