forked from qt-creator/qt-creator
Check the editormanager's current document before to request a new highlight.
This commit is contained in:
@@ -1859,12 +1859,14 @@ void CPPEditor::updateSemanticInfo(const SemanticInfo &semanticInfo)
|
|||||||
m_highlighter.cancel();
|
m_highlighter.cancel();
|
||||||
|
|
||||||
if (semanticInfo.doc) {
|
if (semanticInfo.doc) {
|
||||||
LookupContext context(semanticInfo.doc, semanticInfo.snapshot);
|
if (Core::EditorManager::instance()->currentEditor() == editableInterface()) {
|
||||||
CheckSymbols::Future f = CheckSymbols::go(semanticInfo.doc, context);
|
LookupContext context(semanticInfo.doc, semanticInfo.snapshot);
|
||||||
m_highlighter = f;
|
CheckSymbols::Future f = CheckSymbols::go(semanticInfo.doc, context);
|
||||||
m_highlightRevision = semanticInfo.revision;
|
m_highlighter = f;
|
||||||
m_nextHighlightBlockNumber = 0;
|
m_highlightRevision = semanticInfo.revision;
|
||||||
m_highlightWatcher.setFuture(m_highlighter);
|
m_nextHighlightBlockNumber = 0;
|
||||||
|
m_highlightWatcher.setFuture(m_highlighter);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0 // ### TODO: enable objc semantic highlighting
|
#if 0 // ### TODO: enable objc semantic highlighting
|
||||||
|
Reference in New Issue
Block a user