forked from qt-creator/qt-creator
CppEditor: Do not "highlight parentheses" for multiline C++ comments
Change-Id: I6c84a2653a1e9c13e1c776b49b4e51cb4de772f3 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
This commit is contained in:
committed by
Orgad Shaneh
parent
e5a693be96
commit
474065c5c7
@@ -224,10 +224,13 @@ void CppHighlighter::highlightBlock(const QString &text)
|
||||
if (text.length() > lastTokenEnd)
|
||||
highlightLine(text, lastTokenEnd, text.length() - lastTokenEnd, formatForCategory(CppVisualWhitespace));
|
||||
|
||||
if (!initialLexerState && lexerState && !tokens.isEmpty() && tokens.last().isComment()) {
|
||||
parentheses.append(Parenthesis(Parenthesis::Opened, QLatin1Char('+'),
|
||||
tokens.last().begin()));
|
||||
++braceDepth;
|
||||
if (!initialLexerState && lexerState && !tokens.isEmpty()) {
|
||||
const Token &lastToken = tokens.last();
|
||||
if (lastToken.is(T_COMMENT) || lastToken.is(T_DOXY_COMMENT)) {
|
||||
parentheses.append(Parenthesis(Parenthesis::Opened, QLatin1Char('+'),
|
||||
lastToken.begin()));
|
||||
++braceDepth;
|
||||
}
|
||||
}
|
||||
|
||||
BaseTextDocumentLayout::setParentheses(currentBlock(), parentheses);
|
||||
|
||||
Reference in New Issue
Block a user