If I load a file with automatic spell checking enabled, it does not underline misspelled words. I need to disable automatic spell checking and then reenable it for it to underline misspelled words.
Works for me FWIW.
Did you try just opening a pre-existing file? Start a new kwrite document and start typing misspelled words and see if it detects them. Because I just noticed that when I open a new file, auto spell check works, but if I create a new file and start typing, it doesn't.
Yep. Both cases work in KWrite for me.
Weird. Another oddity: when I invoke a certain function, e.g. find, replace, word wrap, or unhiding the menu bar, auto spell check starts working. Might that be a clue?
Probably the same on Arch Linux. For me regression started with "qt5-base-5.15.2+kde+r171-2-x86_64" The "qt5-base-5.15.2-5-x86_64" worked perfectly. And now elaborate: Spellcheck doesn't work "on type," i.e. works only upon scrolling the line which one desire to check off the screen and back on. Regardless of whether the "Automatic spell checking is enable by default" option is enabled. I am using GB hunspell with Kate.
Seeing the same as Johnny, also on Arch Linux with Hunspell de_De. In addition, I switched on debug reporting for sonnet core + sonnet hunspell, which gave me: kf.sonnet.clients.hunspell: SpellerPlugin *HunspellClient::createSpeller(const QString &language) ; "de_DE" kf.sonnet.clients.hunspell: Loading dictionary for "de_DE" from "/usr/share/hunspell" kf.sonnet.clients.hunspell: Load a user dictionary "/home/peter/.hunspell_de_DE" kf.sonnet.clients.hunspell: Created 0x563e505be0a0 kf.sonnet.core: Using the "Hunspell" plugin for language "de_DE" kf.sonnet.clients.hunspell: isCorrect : "sfsdf" kf.sonnet.clients.hunspell: result : false kf.sonnet.clients.hunspell: isCorrect : "sdfsdf" kf.sonnet.clients.hunspell: result : false kf.sonnet.clients.hunspell: isCorrect : "d" kf.sonnet.clients.hunspell: result : true kf.sonnet.clients.hunspell: isCorrect : "f" kf.sonnet.clients.hunspell: result : true kf.sonnet.clients.hunspell: isCorrect : "g" kf.sonnet.clients.hunspell: result : true I.e.: I switched on auto spellcheck with the text "sfsdf sdfsdf" already typed. Which got the red mark as expected. With auto spellcheck on I typed "dfg", which did not get marked as wrong. If I interpret correctly, hunspell checked every single letter separately instead of the whole word "dfg", thus getting the result "isCorrect". I remember that some time ago (sorry, cannot say exactly when) German Umlaute caused the problem that all letters behind them were always marked as wrong. Later (very probably as Johnny described after "qt5-base-5.15.2+kde+r171-2-x86_64" this changed to spellcheck on typing not working any more. So, word segmentation broke and was "fixed"? Software versions: qt5-base: 5.15.2+kde+r192-1 kde frameworks: 5.82.0 kde gear: 21.04 hunspell: 1.7.0
Not "very probably," but "most precisely." For I tried to downgrade sole package "qt5-base-5.15.2+kde+r171-2-x86_64" (the first version for me where appeared "kde") to "qt5-base-5.15.2-5-x86_64" and the issue disappeared. The problem persists indeed, as of now with: qt5-base 5.15.2+kde+r192-1 kate 21.04.1
Downgrading to qt5-base-5.15.2-5-x86_64 works for me, too. Automatic spell checking also works for German Umlaute after that.
I can reproduce with 5.15.2+kde+r192-1, too :/ Shouldn't the KDE patches be more or less transparent and only contain minimal fixes?
Hi, David, have you some idea? Given people say only downgrading qt-base to the pre-KDE-patches resolves this, this seems strange :/
We had previously some issue with unicode chars inside words, but that was fixed in e.g. bug 433673.
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/ktexteditor/-/merge_requests/154
Git commit 253cc3bba36ab593a3224914521eabdb5fed5266 by Antonio Rojas. Committed on 19/05/2021 at 16:01. Pushed by cullmann into branch 'master'. Fix on-the-fly spell checking with recent Qt Qt commit 3a273ac47f20e82a1f2f63411b210025ca0f4495 changed the behavior of lastIndexOf, so it now starts matching the zero-length regexps from the end of the string. This made the regexp '\b' match the end of the string, making the spell checker think that every character is a word by itself. Fix it by ignoring the last character of the string when searching for the word boundary. M +2 -2 src/spellcheck/ontheflycheck.cpp https://invent.kde.org/frameworks/ktexteditor/commit/253cc3bba36ab593a3224914521eabdb5fed5266
Thanks for the quick fix!
*** Bug 437056 has been marked as a duplicate of this bug. ***