aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--doc/ScintillaHistory.html5
-rw-r--r--lexers/LexCPP.cxx2
2 files changed, 6 insertions, 1 deletions
diff --git a/doc/ScintillaHistory.html b/doc/ScintillaHistory.html
index 6f772b53e..6a90f17e0 100644
--- a/doc/ScintillaHistory.html
+++ b/doc/ScintillaHistory.html
@@ -559,6 +559,11 @@
Released 10 January 2019.
</li>
<li>
+ The C++ lexer, with styling.within.preprocessor on, now interprets "(" in preprocessor "#if("
+ as an operator instead of part of the directive. This improves folding as well which could become
+ unbalanced.
+ </li>
+ <li>
Fix raw strings in nim.
<a href="https://sourceforge.net/p/scintilla/feature-requests/1253/">Feature #1253</a>.
</li>
diff --git a/lexers/LexCPP.cxx b/lexers/LexCPP.cxx
index a9521d683..b768c9a4a 100644
--- a/lexers/LexCPP.cxx
+++ b/lexers/LexCPP.cxx
@@ -950,7 +950,7 @@ void SCI_METHOD LexerCPP::Lex(Sci_PositionU startPos, Sci_Position length, int i
break;
case SCE_C_PREPROCESSOR:
if (options.stylingWithinPreprocessor) {
- if (IsASpace(sc.ch)) {
+ if (IsASpace(sc.ch) || (sc.ch == '(')) {
sc.SetState(SCE_C_DEFAULT|activitySet);
}
} else if (isStringInPreprocessor && (sc.Match('>') || sc.Match('\"') || sc.atLineEnd)) {