Commit 7e099127 authored by Leandro Melo's avatar Leandro Melo Committed by Eike Ziller
Browse files

Gen. highlighter: Fix contexts in continuation blocks



When setting up the current block from a previous WillContinue
one we only use m_contextToContinue for uninitialized blocks.
Otherwise, we use the tracked observable state.

Task-number: QTCREATORBUG-7583

Change-Id: I90f430129b2250402515a552f368f9d17ca73c3b
Reviewed-by: default avatarEike Ziller <eike.ziller@nokia.com>
parent cac28198
......@@ -181,7 +181,12 @@ void Highlighter::setupDefault()
void Highlighter::setupFromWillContinue()
{
BlockData *previousData = blockData(currentBlock().previous().userData());
m_contexts.push_back(previousData->m_contextToContinue);
if (previousData->m_originalObservableState == Default ||
previousData->m_originalObservableState == -1) {
m_contexts.push_back(previousData->m_contextToContinue);
} else {
pushContextSequence(previousData->m_originalObservableState);
}
BlockData *data = blockData(currentBlock().userData());
data->m_originalObservableState = previousData->m_originalObservableState;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment