diff options
author | Neil <nyamatongwe@gmail.com> | 2013-09-06 09:27:56 +1000 |
---|---|---|
committer | Neil <nyamatongwe@gmail.com> | 2013-09-06 09:27:56 +1000 |
commit | 30c8f601262456acbc47b2c22b83320ce03939ce (patch) | |
tree | 85701ddb9480ba1669dd178e951e3d97c6a3c7d5 | |
parent | 258060914b6c1aa88197619e87e4393b4dc9fa65 (diff) | |
download | scintilla-mirror-30c8f601262456acbc47b2c22b83320ce03939ce.tar.gz |
Bug [#1521]. Allow tab, cariage return and new line separators for SCI_SETIDENTIFIERS.
Treat multiple separators as a single separator.
-rw-r--r-- | lexlib/SubStyles.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lexlib/SubStyles.h b/lexlib/SubStyles.h index ee0edce96..961715c3c 100644 --- a/lexlib/SubStyles.h +++ b/lexlib/SubStyles.h @@ -62,10 +62,12 @@ public: void SetIdentifiers(int style, const char *identifiers) { while (*identifiers) { const char *cpSpace = identifiers; - while (*cpSpace && *cpSpace != ' ') + while (*cpSpace && !(*cpSpace == ' ' || *cpSpace == '\t' || *cpSpace == '\r' || *cpSpace == '\n')) cpSpace++; - std::string word(identifiers, cpSpace - identifiers); - wordToStyle[word] = style; + if (cpSpace > identifiers) { + std::string word(identifiers, cpSpace - identifiers); + wordToStyle[word] = style; + } identifiers = cpSpace; if (*identifiers) identifiers++; |