aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authornyamatongwe <devnull@localhost>2010-05-11 23:34:47 +0000
committernyamatongwe <devnull@localhost>2010-05-11 23:34:47 +0000
commitc80245c635898cbe4715cca13a43743046d01b6d (patch)
tree9d9b81779fba51a83a904f97adfb5f33ec62a8ef /src
parentfc9242bae1b7ea2e1ac0412c335b27192ba6fcbd (diff)
downloadscintilla-mirror-c80245c635898cbe4715cca13a43743046d01b6d.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;