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 | e8eae216a8ee441e620fd925370cc905a81ee966 (patch) | |
tree | 84c4996ee4afdf1fde8ece5df1ef18b43a15e4b4 /lexlib/SubStyles.h | |
parent | 80781c95bbdaa770cce026c6e0461c803ead84bb (diff) | |
download | scintilla-mirror-e8eae216a8ee441e620fd925370cc905a81ee966.tar.gz |
Bug [#1521]. Allow tab, cariage return and new line separators for SCI_SETIDENTIFIERS.
Treat multiple separators as a single separator.
Diffstat (limited to 'lexlib/SubStyles.h')
-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++; |