SUMMARY Kdevelop's syntax highlighter stops working under some circumstances. STEPS TO REPRODUCE 1. write some C/C++ code 2. mismatch brackets, write something wrong. 3. OBSERVED RESULT Sometimes, hard to tell exactly when, but it seems when particular errors are present such as mismatched brackets, the syntax highlighter stops working and the code is all black. EXPECTED RESULT Syntax highlighting should go on working regardless of code errors, just like in Kwrite. SOFTWARE/OS VERSIONS Windows: macOS: Linux/KDE Plasma: fc33 (available in About System) KDE Plasma Version: 5.20.5 KDE Frameworks Version: 5.79 Qt Version: 5.15.2 ADDITIONAL INFORMATION When this situation occurs, the code is highlighted again if I remove (undo) the last written text, which is the one that caused the error. But from then on, even moving one line of code up or down, makes the highlighter stop working again. I ultimately have to reload the file or close and reopen kdevelop. At which point, the highlighter works ok meaning the source code itself causes no problems.
I've just noticed the code is not completely un-highlighted, I saw it black because of a coincidence (my theme). It actually falls back to very minimal highlighting, where keywords only are highlighted, just as Kwrite does.
This is a bug in KTextEditor 5.79, not in KDevelop directly. It will be fixed by the next KDE Frameworks release. https://invent.kde.org/frameworks/ktexteditor/-/commit/686da7797105a93035cfbc7edbf2a8e8f8adf0ec *** This bug has been marked as a duplicate of bug 433434 ***
(In reply to Milian Wolff from comment #2) > This is a bug in KTextEditor 5.79, not in KDevelop directly. It will be > fixed by the next KDE Frameworks release. Alright, thank you for letting me know.
In fact, 5.80 is now out, so it's fixed by the *current* Frameworks release.