Commit d9c11016 authored by Martin Seher's avatar Martin Seher Committed by Milian Wolff
Browse files

Add fast-path to disable local colorization when intensity is 0

When the setting is set to 0, the colorization won't have any
effect anyways, so we can skip it directly.
parent 3dad4182
......@@ -230,9 +230,10 @@ void CodeHighlightingInstance::highlightDUChain(DUContext* context, QHash<Declar
QList<Declaration*> takeFreeColors;
bool noRainbow = ICore::self()->languageController()->completionSettings()->localColorizationLevel() == 0;
const auto localDeclarations = context->localDeclarations();
for (Declaration* dec : localDeclarations) {
if (!useRainbowColor(dec)) {
if (noRainbow || !useRainbowColor(dec)) {
highlightDeclaration(dec, QColor(QColor::Invalid));
Supports Markdown
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