summaryrefslogtreecommitdiff
path: root/src/plugins/cpptools/cpphighlightingsupportinternal.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/cpptools/cpphighlightingsupportinternal.cpp')
-rw-r--r--src/plugins/cpptools/cpphighlightingsupportinternal.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/plugins/cpptools/cpphighlightingsupportinternal.cpp b/src/plugins/cpptools/cpphighlightingsupportinternal.cpp
index 3009d45c16..d2a14170e4 100644
--- a/src/plugins/cpptools/cpphighlightingsupportinternal.cpp
+++ b/src/plugins/cpptools/cpphighlightingsupportinternal.cpp
@@ -58,6 +58,9 @@ QFuture<TextEditor::HighlightingResult> CppHighlightingSupportInternal::highligh
// Get macro definitions
foreach (const CPlusPlus::Macro& macro, doc->definedMacros()) {
+ if (macro.isPredefined())
+ continue; // No "real" definition location
+
int line, column;
editor()->convertPosition(macro.offset(), &line, &column);
++column; //Highlighting starts at (column-1) --> compensate here