aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/languageclient/client.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/languageclient/client.cpp')
-rw-r--r--src/plugins/languageclient/client.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/plugins/languageclient/client.cpp b/src/plugins/languageclient/client.cpp
index 3757800a070..c036646c59e 100644
--- a/src/plugins/languageclient/client.cpp
+++ b/src/plugins/languageclient/client.cpp
@@ -377,7 +377,7 @@ void Client::activateDocument(TextEditor::TextDocument *document)
for (Core::IEditor *editor : Core::DocumentModel::editorsForDocument(document)) {
updateEditorToolBar(editor);
if (auto textEditor = qobject_cast<TextEditor::BaseTextEditor *>(editor))
- textEditor->editorWidget()->addHoverHandler(hoverHandler());
+ textEditor->editorWidget()->addHoverHandler(&m_hoverHandler);
}
}
@@ -387,6 +387,10 @@ void Client::deactivateDocument(TextEditor::TextDocument *document)
resetAssistProviders(document);
if (TextEditor::SyntaxHighlighter *highlighter = document->syntaxHighlighter())
highlighter->clearAllExtraFormats();
+ for (Core::IEditor *editor : Core::DocumentModel::editorsForDocument(document)) {
+ if (auto textEditor = qobject_cast<TextEditor::BaseTextEditor *>(editor))
+ textEditor->editorWidget()->removeHoverHandler(&m_hoverHandler);
+ }
}
bool Client::documentOpen(TextEditor::TextDocument *document) const