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