From e95830ea8681727d86665d06dd1689019a01a335 Mon Sep 17 00:00:00 2001 From: huki Date: Mon, 24 Sep 2018 09:24:10 +1000 Subject: Backport: Bug [#2045]. LexCPP: Fix 'elif' token length Backport of changeset 7094:fa4b41e8a452. --- lexers/LexCPP.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lexers') 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(); -- cgit v1.2.3