aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/ScintillaBase.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'src/ScintillaBase.cxx')
-rw-r--r--src/ScintillaBase.cxx10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/ScintillaBase.cxx b/src/ScintillaBase.cxx
index 0b7adbd67..b538fee2e 100644
--- a/src/ScintillaBase.cxx
+++ b/src/ScintillaBase.cxx
@@ -675,7 +675,15 @@ void LexState::SetWordList(int n, const char *wl) {
}
const char *LexState::GetName() const {
- return lexCurrent ? lexCurrent->languageName : "";
+ if (lexCurrent) {
+ return lexCurrent->languageName;
+ }
+ if (instance) {
+ if (instance->Version() >= lvIdentity) {
+ return static_cast<ILexerWithIdentity *>(instance)->GetName();
+ }
+ }
+ return "";
}
void *LexState::PrivateCall(int operation, void *pointer) {