mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Fix highlighting of macro arguments
This commit is contained in:
parent
f638f58c76
commit
f0953b21f0
1 changed files with 6 additions and 3 deletions
|
@ -215,6 +215,7 @@ public class SemanticHighlightingReconciler implements ICReconcilingListener {
|
||||||
}
|
}
|
||||||
IASTNode macroNode= node.getTranslationUnit().selectNodeForLocation(fFilePath, useOffset, macroLength);
|
IASTNode macroNode= node.getTranslationUnit().selectNodeForLocation(fFilePath, useOffset, macroLength);
|
||||||
if (macroNode != null && visitMacro(macroNode, macroLength)) {
|
if (macroNode != null && visitMacro(macroNode, macroLength)) {
|
||||||
|
fMinLocation= useOffset + macroLength;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -291,11 +292,13 @@ public class SemanticHighlightingReconciler implements ICReconcilingListener {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
int offset= nodeLocation.getNodeOffset();
|
int offset= nodeLocation.getNodeOffset();
|
||||||
|
if (offset >= fMinLocation) {
|
||||||
int length= nodeLocation.getNodeLength();
|
int length= nodeLocation.getNodeLength();
|
||||||
if (offset > -1 && length > 0) {
|
if (offset > -1 && length > 0) {
|
||||||
addPosition(offset, length, highlighting);
|
addPosition(offset, length, highlighting);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add the a location range for the given macro highlighting.
|
* Add the a location range for the given macro highlighting.
|
||||||
|
|
Loading…
Add table
Reference in a new issue