diff options
author | nyamatongwe <devnull@localhost> | 2010-07-28 17:54:24 +1000 |
---|---|---|
committer | nyamatongwe <devnull@localhost> | 2010-07-28 17:54:24 +1000 |
commit | 7317421053e0b1ddde78e0ddd317d6b6fb52aa57 (patch) | |
tree | f6cbcf5648f869cdb62556d39e9223f94307ee94 /src/ScintillaBase.cxx | |
parent | fc8b0efdbd3f1156feb7fb28d2934c79f1119e8e (diff) | |
download | scintilla-mirror-7317421053e0b1ddde78e0ddd317d6b6fb52aa57.tar.gz |
Restore container lexing functionality which was accidentally removed by lexer objects changes.rel-2-20
Diffstat (limited to 'src/ScintillaBase.cxx')
-rw-r--r-- | src/ScintillaBase.cxx | 15 |
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) { |