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 | bf4cbf50a43ed6e803073ff64a923f5d72fbee9c (patch) | |
| tree | 4cf02a990062d5bc7b18c24b353e3ff9e941f4c9 | |
| parent | 43372db176028d74ee3d14dd28f7a2063b1ce83e (diff) | |
| download | scintilla-mirror-bf4cbf50a43ed6e803073ff64a923f5d72fbee9c.tar.gz | |
Bug [#2045]. LexCPP: Fix 'elif' token length
| -rw-r--r-- | doc/ScintillaHistory.html | 5 | ||||
| -rw-r--r-- | lexers/LexCPP.cxx | 2 | 
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(); | 
