Commit 62f050e4 authored by Leandro Melo's avatar Leandro Melo
Browse files

CMake: Consider visual whitespaces format in the highlighter.

parent 36ebe35e
......@@ -109,7 +109,8 @@ void CMakeEditor::setFontSettings(const TextEditor::FontSettings &fs)
categories << QLatin1String(TextEditor::Constants::C_LABEL) // variables
<< QLatin1String(TextEditor::Constants::C_LINK) // functions
<< QLatin1String(TextEditor::Constants::C_COMMENT)
<< QLatin1String(TextEditor::Constants::C_STRING);
<< QLatin1String(TextEditor::Constants::C_STRING)
<< QLatin1String(TextEditor::Constants::C_VISUAL_WHITESPACE);
}
const QVector<QTextCharFormat> formats = fs.toTextCharFormats(categories);
......
......@@ -129,5 +129,7 @@ void CMakeHighlighter::highlightBlock(const QString &text)
} else {
setCurrentBlockState(0);
}
applyFormatToSpaces(text, m_formats[CMakeVisualWhiteSpaceFormat]);
}
......@@ -50,6 +50,7 @@ public:
CMakeFunctionFormat,
CMakeCommentFormat,
CMakeStringFormat,
CMakeVisualWhiteSpaceFormat,
NumCMakeFormats
};
......
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