Changeset View
Changeset View
Standalone View
Standalone View
src/lib/abstracthighlighter.cpp
Context not available. | |||||
127 | auto defData = DefinitionData::get(d->m_definition); | 127 | auto defData = DefinitionData::get(d->m_definition); | ||
---|---|---|---|---|---|
128 | auto newState = state; | 128 | auto newState = state; | ||
129 | auto stateData = StateData::get(newState); | 129 | auto stateData = StateData::get(newState); | ||
130 | if (stateData->m_defData && defData != stateData->m_defData) { | 130 | const DefinitionRef currentDefRef (d->m_definition); | ||
131 | if (!stateData->isEmpty() && (stateData->m_defRef != currentDefRef)) { | ||||
131 | qCDebug(Log) << "Got invalid state, resetting."; | 132 | qCDebug(Log) << "Got invalid state, resetting."; | ||
132 | stateData->clear(); | 133 | stateData->clear(); | ||
133 | } | 134 | } | ||
134 | if (stateData->isEmpty()) { | 135 | if (stateData->isEmpty()) { | ||
135 | stateData->push(defData->initialContext(), QStringList()); | 136 | stateData->push(defData->initialContext(), QStringList()); | ||
136 | stateData->m_defData = defData; | 137 | stateData->m_defRef = currentDefRef; | ||
137 | } | 138 | } | ||
138 | 139 | | |||
139 | // process empty lines | 140 | // process empty lines | ||
Context not available. |