diff options
author | Zufu Liu <unknown> | 2021-02-04 12:50:07 +1100 |
---|---|---|
committer | Zufu Liu <unknown> | 2021-02-04 12:50:07 +1100 |
commit | a9d4faa8f8590de5d78b97e7aeea6dd13c903483 (patch) | |
tree | 1eb6ec18f980891d39d9b21b9d822cd0c2912d2d | |
parent | 6654983e2c23e355da2666589cce52e42c9daa40 (diff) | |
download | scintilla-mirror-a9d4faa8f8590de5d78b97e7aeea6dd13c903483.tar.gz |
Feature [feature-requests:1391]. Remove unused fields from LexState.
Removes checks for ILexer version so requires ILexer5 to be fully implemented.
-rw-r--r-- | src/ScintillaBase.cxx | 20 |
1 files changed, 5 insertions, 15 deletions
diff --git a/src/ScintillaBase.cxx b/src/ScintillaBase.cxx index 8cf5b5a2c..c69db0016 100644 --- a/src/ScintillaBase.cxx +++ b/src/ScintillaBase.cxx @@ -535,10 +535,7 @@ void ScintillaBase::RightButtonDownWithModifiers(Point pt, unsigned int curTime, namespace Scintilla { class LexState : public LexInterface { - int interfaceVersion; public: - int lexLanguage; - explicit LexState(Document *pdoc_); void SetInstance(ILexer5 *instance_); // Deleted so LexState objects can not be copied. @@ -580,9 +577,6 @@ public: } LexState::LexState(Document *pdoc_) : LexInterface(pdoc_) { - performingStyle = false; - interfaceVersion = lvRelease4; - lexLanguage = 0; } LexState::~LexState() { @@ -627,24 +621,20 @@ void LexState::SetWordList(int n, const char *wl) { int LexState::GetIdentifier() const { if (instance) { - if (instance->Version() >= lvRelease5) { - return instance->GetIdentifier(); - } + return instance->GetIdentifier(); } return 0; } const char *LexState::GetName() const { if (instance) { - if (instance->Version() >= lvRelease5) { - return instance->GetName(); - } + return instance->GetName(); } return ""; } void *LexState::PrivateCall(int operation, void *pointer) { - if (pdoc && instance) { + if (instance) { return instance->PrivateCall(operation, pointer); } else { return nullptr; @@ -817,7 +807,7 @@ const char *LexState::DescriptionOfStyle(int style) { } void ScintillaBase::NotifyStyleToNeeded(Sci::Position endStyleNeeded) { - if (DocumentLexState()->GetIdentifier() != 0) { + if (!DocumentLexState()->UseContainerLexing()) { const Sci::Line lineEndStyled = pdoc->SciLineFromPosition(pdoc->GetEndStyled()); const Sci::Position endStyled = @@ -1035,7 +1025,7 @@ sptr_t ScintillaBase::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lPara return 0; case SCI_COLOURISE: - if (DocumentLexState()->lexLanguage == 0) { + if (DocumentLexState()->UseContainerLexing()) { pdoc->ModifiedAt(static_cast<Sci::Position>(wParam)); NotifyStyleToNeeded((lParam == -1) ? pdoc->Length() : lParam); } else { |