forked from qt-creator/qt-creator
CMake: Consider visual whitespaces format in the highlighter.
This commit is contained in:
@@ -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
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user