diff options
author | Neil <nyamatongwe@gmail.com> | 2015-05-12 12:11:46 +1000 |
---|---|---|
committer | Neil <nyamatongwe@gmail.com> | 2015-05-12 12:11:46 +1000 |
commit | ced84459c7dd731470edba244101e5578ef8bfe9 (patch) | |
tree | eed9d6c16126f4c0110bc1672b77fe72cf115826 | |
parent | ef8100fc09f74722b1a0afbd7f3a5373aa23ddd5 (diff) | |
download | scintilla-mirror-ced84459c7dd731470edba244101e5578ef8bfe9.tar.gz |
Bug [#1719]. Fix #undef directive.
-rw-r--r-- | doc/ScintillaHistory.html | 4 | ||||
-rw-r--r-- | lexers/LexCPP.cxx | 5 |
2 files changed, 6 insertions, 3 deletions
diff --git a/doc/ScintillaHistory.html b/doc/ScintillaHistory.html index f59fe69fd..f8c5349f6 100644 --- a/doc/ScintillaHistory.html +++ b/doc/ScintillaHistory.html @@ -498,6 +498,10 @@ <a href="http://sourceforge.net/p/scintilla/bugs/1711/">Bug #1711</a>. </li> <li> + C++ lexer fixes #undef directive. + <a href="http://sourceforge.net/p/scintilla/bugs/1719/">Bug #1719</a>. + </li> + <li> Verilog folder folds interface definitions. </li> <li> diff --git a/lexers/LexCPP.cxx b/lexers/LexCPP.cxx index 33e7a5608..1d9e40d17 100644 --- a/lexers/LexCPP.cxx +++ b/lexers/LexCPP.cxx @@ -1245,11 +1245,10 @@ void SCI_METHOD LexerCPP::Lex(unsigned int startPos, int length, int initStyle, } } else if (sc.Match("undef")) { if (options.updatePreprocessor && !preproc.IsInactive()) { - std::string restOfLine = GetRestOfLine(styler, sc.currentPos + 5, true); + const std::string restOfLine = GetRestOfLine(styler, sc.currentPos + 5, false); std::vector<std::string> tokens = Tokenize(restOfLine); - std::string key; if (tokens.size() >= 1) { - key = tokens[0]; + const std::string key = tokens[0]; preprocessorDefinitions.erase(key); ppDefineHistory.push_back(PPDefinition(lineCurrent, key, "", true)); definitionsChanged = true; |