aboutsummaryrefslogtreecommitdiffhomepage
path: root/lexers/LexCPP.cxx
diff options
context:
space:
mode:
authorNeil <nyamatongwe@gmail.com>2015-05-12 12:11:46 +1000
committerNeil <nyamatongwe@gmail.com>2015-05-12 12:11:46 +1000
commitfb7c4c8fa8f7ace0ed430fedb8084f8d1d4f237b (patch)
treeb365a89c57260426f29a01cc4ecf76d77c569dad /lexers/LexCPP.cxx
parentf4f04da00a0e9fa577674474dd495346d67b356a (diff)
downloadscintilla-mirror-fb7c4c8fa8f7ace0ed430fedb8084f8d1d4f237b.tar.gz
Bug [#1719]. Fix #undef directive.
Diffstat (limited to 'lexers/LexCPP.cxx')
-rw-r--r--lexers/LexCPP.cxx5
1 files changed, 2 insertions, 3 deletions
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;