aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/languageclient/languageclientutils.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/languageclient/languageclientutils.cpp')
-rw-r--r--src/plugins/languageclient/languageclientutils.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/plugins/languageclient/languageclientutils.cpp b/src/plugins/languageclient/languageclientutils.cpp
index f81be2427cc..7a28c5e3a95 100644
--- a/src/plugins/languageclient/languageclientutils.cpp
+++ b/src/plugins/languageclient/languageclientutils.cpp
@@ -133,12 +133,10 @@ void updateCodeActionRefactoringMarker(Client *client,
TextDocument* doc = TextDocument::textDocumentForFileName(uri.toFileName());
if (!doc)
return;
- BaseTextEditor *editor = BaseTextEditor::textEditorForDocument(doc);
- if (!editor)
+ const QVector<BaseTextEditor *> editors = BaseTextEditor::textEditorsForDocument(doc);
+ if (editors.isEmpty())
return;
- TextEditorWidget *editorWidget = editor->editorWidget();
-
const QList<Diagnostic> &diagnostics = action.diagnostics().value_or(QList<Diagnostic>());
RefactorMarkers markers;
@@ -181,7 +179,10 @@ void updateCodeActionRefactoringMarker(Client *client,
marker.cursor = endOfLineCursor(diagnostic.range().start().toTextCursor(doc->document()));
markers << marker;
}
- editorWidget->setRefactorMarkers(markers + editorWidget->refactorMarkers());
+ for (BaseTextEditor *editor : editors) {
+ if (TextEditorWidget *editorWidget = editor->editorWidget())
+ editorWidget->setRefactorMarkers(markers + editorWidget->refactorMarkers());
+ }
}
} // namespace LanguageClient