diff options
author | huki <gk7huki@gmail.com> | 2018-09-24 09:24:10 +1000 |
---|---|---|
committer | huki <gk7huki@gmail.com> | 2018-09-24 09:24:10 +1000 |
commit | e95830ea8681727d86665d06dd1689019a01a335 (patch) | |
tree | b164767014570781d6de2982a0a1f6a54ace74f4 | |
parent | bfac5d65c34a5a4965f2fe21cf1ebd4c39811f2a (diff) | |
download | scintilla-mirror-e95830ea8681727d86665d06dd1689019a01a335.tar.gz |
Backport: Bug [#2045]. LexCPP: Fix 'elif' token length
Backport of changeset 7094:fa4b41e8a452.
-rw-r--r-- | doc/ScintillaHistory.html | 9 | ||||
-rw-r--r-- | lexers/LexCPP.cxx | 2 |
2 files changed, 8 insertions, 3 deletions
diff --git a/doc/ScintillaHistory.html b/doc/ScintillaHistory.html index 0a50bfd6a..d01a3a8b1 100644 --- a/doc/ScintillaHistory.html +++ b/doc/ScintillaHistory.html @@ -527,6 +527,7 @@ <td>Luke Rasmussen</td> </tr><tr> <td>maboroshin</td> + <td>Gokul Krishnan</td> </tr> </table> <p> @@ -555,13 +556,17 @@ <a href="https://sourceforge.net/p/scintilla/feature-requests/1185/">Feature #1185.</a> </li> <li> - Shell folder folds "if", "do", and "case". - <a href="https://sourceforge.net/p/scintilla/feature-requests/1144/">Feature #1144.</a> + 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> <li> + Shell folder folds "if", "do", and "case". + <a href="https://sourceforge.net/p/scintilla/feature-requests/1144/">Feature #1144.</a> + </li> + <li> Fix margin cursor on Cocoa to point more accurately. </li> </ul> diff --git a/lexers/LexCPP.cxx b/lexers/LexCPP.cxx index a3942b5e3..3dac142ab 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(); |