aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/ScintillaBase.cxx
diff options
context:
space:
mode:
authornyamatongwe <unknown>2010-07-28 17:54:24 +1000
committernyamatongwe <unknown>2010-07-28 17:54:24 +1000
commit6f83fe733e48c36df35ecc1a10d7197b2b7a7dda (patch)
tree7707c8491a64e1e55fd3778f3b27952b2d186ce9 /src/ScintillaBase.cxx
parentbb7386900f5ff0c66f5a6e296721bb2eb475e524 (diff)
downloadscintilla-mirror-6f83fe733e48c36df35ecc1a10d7197b2b7a7dda.tar.gz
Restore container lexing functionality which was accidentally removed by lexer objects changes.
Diffstat (limited to 'src/ScintillaBase.cxx')
-rw-r--r--src/ScintillaBase.cxx15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/ScintillaBase.cxx b/src/ScintillaBase.cxx
index 2f84db7cd..b4accacb9 100644
--- a/src/ScintillaBase.cxx
+++ b/src/ScintillaBase.cxx
@@ -527,17 +527,22 @@ void LexState::SetLexerModule(const LexerModule *lex) {
instance = 0;
}
lexCurrent = lex;
- instance = lexCurrent->Create();
+ if (lexCurrent)
+ instance = lexCurrent->Create();
pdoc->LexerChanged();
}
}
void LexState::SetLexer(uptr_t wParam) {
lexLanguage = wParam;
- const LexerModule *lex = Catalogue::Find(lexLanguage);
- if (!lex)
- lex = Catalogue::Find(SCLEX_NULL);
- SetLexerModule(lex);
+ if (lexLanguage == SCLEX_CONTAINER) {
+ SetLexerModule(0);
+ } else {
+ const LexerModule *lex = Catalogue::Find(lexLanguage);
+ if (!lex)
+ lex = Catalogue::Find(SCLEX_NULL);
+ SetLexerModule(lex);
+ }
}
void LexState::SetLexerLanguage(const char *languageName) {