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 97ea20408..8f9773f40 100644
--- a/doc/ScintillaHistory.html
+++ b/doc/ScintillaHistory.html
@@ -535,6 +535,7 @@
<td>Luke Rasmussen</td>
</tr><tr>
<td>maboroshin</td>
+ <td>Gokul Krishnan</td>
</tr>
</table>
<p>
@@ -554,6 +555,10 @@
Released 9 September 2018.
</li>
<li>
+ C++ lexer fixes evaluation of "#elif".
+ <a href="https://sourceforge.net/p/scintilla/bugs/2045/">Bug #2045</a>.
+ </li>
+ <li>
Markdown lexer fixes highlighting of non-ASCII characters in links.
</li>
</ul>
diff --git a/lexers/LexCPP.cxx b/lexers/LexCPP.cxx
index ee645e9e0..4df005af2 100644
--- a/lexers/LexCPP.cxx
+++ b/lexers/LexCPP.cxx
@@ -1279,7 +1279,7 @@ void SCI_METHOD LexerCPP::Lex(Sci_PositionU startPos, Sci_Position length, int i
// Ensure only one chosen out of #if .. #elif .. #elif .. #else .. #endif
if (!preproc.CurrentIfTaken()) {
// Similar to #if
- std::string restOfLine = GetRestOfLine(styler, sc.currentPos + 2, true);
+ std::string restOfLine = GetRestOfLine(styler, sc.currentPos + 4, true);
const bool ifGood = EvaluateExpression(restOfLine, preprocessorDefinitions);
if (ifGood) {
preproc.InvertCurrentLevel();