Bug 434672 - Kdevelop's syntax highlighter fails after code errors
Summary: Kdevelop's syntax highlighter fails after code errors
Status: RESOLVED DUPLICATE of bug 433434
Alias: None
Product: kdevelop
Classification: Applications
Component: Language Support: CPP (Clang-based) (show other bugs)
Version: 5.6.2
Platform: Fedora RPMs Linux
: NOR major
Target Milestone: ---
Assignee: kdevelop-bugs-null
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-03-20 14:24 UTC by David
Modified: 2021-03-21 22:40 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David 2021-03-20 14:24:29 UTC
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.
Comment 1 David 2021-03-20 14:42:16 UTC
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.
Comment 2 Milian Wolff 2021-03-21 20:37:03 UTC
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 ***
Comment 3 David 2021-03-21 22:24:07 UTC
(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.
Comment 4 Francis Herne 2021-03-21 22:40:54 UTC
In fact, 5.80 is now out, so it's fixed by the *current* Frameworks release.