aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authornyamatongwe <unknown>2010-05-11 23:34:47 +0000
committernyamatongwe <unknown>2010-05-11 23:34:47 +0000
commit9328c929f1e7259ec256f076eba0a47013a5fb62 (patch)
tree9d9b81779fba51a83a904f97adfb5f33ec62a8ef /src
parent5b6d0bca53858fdef7ceee5b844c726436a0c2c9 (diff)
downloadscintilla-mirror-9328c929f1e7259ec256f076eba0a47013a5fb62.tar.gz
Ensure each external lexer library is only loaded once.
Diffstat (limited to 'src')
-rw-r--r--src/ExternalLexer.cxx4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/ExternalLexer.cxx b/src/ExternalLexer.cxx
index 9e175a88f..1c00ec02e 100644
--- a/src/ExternalLexer.cxx
+++ b/src/ExternalLexer.cxx
@@ -221,6 +221,10 @@ void LexerManager::Load(const char *path) {
}
void LexerManager::LoadLexerLibrary(const char *module) {
+ for (LexerLibrary *ll = first; ll; ll= ll->next) {
+ if (strcmp(ll->m_sModuleName.c_str(), module) == 0)
+ return;
+ }
LexerLibrary *lib = new LexerLibrary(module);
if (NULL != first) {
last->next = lib;