Commit 44a5e292 authored by Roberto Raggi's avatar Roberto Raggi

Check the editormanager's current document before to request a new highlight.

parent f64e7a18
......@@ -1859,12 +1859,14 @@ void CPPEditor::updateSemanticInfo(const SemanticInfo &semanticInfo)
m_highlighter.cancel();
if (semanticInfo.doc) {
LookupContext context(semanticInfo.doc, semanticInfo.snapshot);
CheckSymbols::Future f = CheckSymbols::go(semanticInfo.doc, context);
m_highlighter = f;
m_highlightRevision = semanticInfo.revision;
m_nextHighlightBlockNumber = 0;
m_highlightWatcher.setFuture(m_highlighter);
if (Core::EditorManager::instance()->currentEditor() == editableInterface()) {
LookupContext context(semanticInfo.doc, semanticInfo.snapshot);
CheckSymbols::Future f = CheckSymbols::go(semanticInfo.doc, context);
m_highlighter = f;
m_highlightRevision = semanticInfo.revision;
m_nextHighlightBlockNumber = 0;
m_highlightWatcher.setFuture(m_highlighter);
}
}
#if 0 // ### TODO: enable objc semantic highlighting
......
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