Created attachment 152055 [details] before fixing grammar Read the message in LT_fixing_1.png. There is a sentence "- qui empêche tout passage dans l'herbe". LT offers to replace "dans" by "sur" I accept. Result : "- qui empêche tout passagesurs l'herbe" Read the replacement in LT_fixing_2.png. For one message I get many bad replacements like this, for example "facile" by "facile,e". SOFTWARE/OS VERSIONS Windows: macOS: Linux/KDE Plasma: (available in About System) KDE Plasma Version: 5.25.5 KDE Frameworks Version: 5.97.0 Qt Version: 5.15.5 KE Gears 2022.08.1 ADDITIONAL INFORMATION
Created attachment 152056 [details] after fixing grammar
Ok I can reproduce bug. It's a bug when we replace an element with a size != from element that we want to replace. => after that you replace another one which doesn't have correct position. I need to update all position.
In progress. I fixed some bugs. I added autotest. But not perfect yet. It works when all text is in one block not when it's two blocks.
Git commit 42325595ebc81460e90bb3db5820c8f02cd7c2c9 by Laurent Montel. Committed on 15/09/2022 at 11:57. Pushed by mlaurent into branch 'release/22.08'. Fix bug 459113: bad replacement by Language Too FIXED-IN: 22.08.2 M +124 -0 kmail/grammarplugins/grammarcommon/autotests/grammarresultutiltest.cpp M +1 -1 kmail/grammarplugins/grammarcommon/grammarresulttextedit.cpp M +26 -32 kmail/grammarplugins/grammarcommon/grammarresultutil.cpp M +1 -1 kmail/grammarplugins/languagetool/src/languagetoolgrammarerror.cpp M +1 -1 kmail/grammarplugins/languagetool/src/languagetoolparser.cpp https://invent.kde.org/pim/kdepim-addons/commit/42325595ebc81460e90bb3db5820c8f02cd7c2c9