Commit 5d076e29 authored by Sven Brauch's avatar Sven Brauch
Browse files

Hopefully fix screwed-up clang higlighting.

If you see this happening again, please tell me.
Make sure to also update kdevplatform.
CCMAIL:kdevelop-devel@kde.org
REVIEW:128480
The issue was that the clang plugin wouldn't store the modification
revision for files which were marked as "not modified" by KTextEditor.
Thus, no translation of the highlighting to the new state could be
performed for those documents. This is wrong, since a document can
be "not modified", but can still have changed in the time between the
start of the parse job start and end, etc. Just imagine you
press save after each character typed.
parent 50041d95
......@@ -189,7 +189,9 @@ ClangParseJob::ClangParseJob(const IndexedString& url, ILanguageSupport* languag
foreach(auto document, ICore::self()->documentController()->openDocuments()) {
auto textDocument = document->textDocument();
if (!textDocument || !textDocument->isModified() || !textDocument->url().isLocalFile()
// TODO: Introduce a cache so we don't have to re-read all the open documents
// which were not changed since the last run
if (!textDocument || !textDocument->url().isLocalFile()
|| !DocumentFinderHelpers::mimeTypesList().contains(textDocument->mimeType()))
{
continue;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment