forked from qt-creator/qt-creator
LanguageClient: stop documentHighlights timer on document changes
If the position was changed right before the document was edited the timer might still be running. Change-Id: Ieaa4de5cc10f25e6d58afaf9525417e11a34d1db Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -723,12 +723,11 @@ void Client::documentContentsChanged(TextEditor::TextDocument *document,
|
||||
|
||||
using namespace TextEditor;
|
||||
for (BaseTextEditor *editor : BaseTextEditor::textEditorsForDocument(document)) {
|
||||
if (TextEditorWidget *widget = editor->editorWidget()) {
|
||||
widget->setRefactorMarkers(
|
||||
RefactorMarker::filterOutType(widget->refactorMarkers(), id()));
|
||||
TextEditorWidget *widget = editor->editorWidget();
|
||||
QTC_ASSERT(widget, continue);
|
||||
delete m_documentHighlightsTimer.take(widget);
|
||||
widget->setRefactorMarkers(RefactorMarker::filterOutType(widget->refactorMarkers(), id()));
|
||||
}
|
||||
}
|
||||
|
||||
m_documentUpdateTimer.start();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user