aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/cppeditor/cpphighlighter.cpp
diff options
context:
space:
mode:
authorOrgad Shaneh <orgad.shaneh@audiocodes.com>2014-01-19 22:24:14 +0200
committerOrgad Shaneh <orgads@gmail.com>2014-01-21 10:54:56 +0100
commit0f4e3c356a9931a984242c55daf0c8d703882f42 (patch)
treea01d133ec901d8236394b8247361abe552a5562e /src/plugins/cppeditor/cpphighlighter.cpp
parentc06e68c439ec4e6b34520aff3df6efd4fefd8678 (diff)
C++: Support multiline strings and comments
Task-number: QTCREATORBUG-662 Change-Id: I0997fe2afaba71998d5da549b7141df0c023ff12 Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
Diffstat (limited to 'src/plugins/cppeditor/cpphighlighter.cpp')
-rw-r--r--src/plugins/cppeditor/cpphighlighter.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/cppeditor/cpphighlighter.cpp b/src/plugins/cppeditor/cpphighlighter.cpp
index fd3d39a182..dec2b2f082 100644
--- a/src/plugins/cppeditor/cpphighlighter.cpp
+++ b/src/plugins/cppeditor/cpphighlighter.cpp
@@ -223,7 +223,7 @@ void CppHighlighter::highlightBlock(const QString &text)
if (text.length() > lastTokenEnd)
highlightLine(text, lastTokenEnd, text.length() - lastTokenEnd, formatForCategory(CppVisualWhitespace));
- if (!initialState && state && !tokens.isEmpty()) {
+ if (!initialState && state && !tokens.isEmpty() && tokens.last().isComment()) {
parentheses.append(Parenthesis(Parenthesis::Opened, QLatin1Char('+'),
tokens.last().begin()));
++braceDepth;