summaryrefslogtreecommitdiff
path: root/src/plugins/python/pythonutils.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/python/pythonutils.cpp')
-rw-r--r--src/plugins/python/pythonutils.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/plugins/python/pythonutils.cpp b/src/plugins/python/pythonutils.cpp
index acb78ef4c3..0af6d5fd5a 100644
--- a/src/plugins/python/pythonutils.cpp
+++ b/src/plugins/python/pythonutils.cpp
@@ -328,8 +328,15 @@ void updateEditorInfoBar(const FilePath &python, TextEditor::TextDocument *docum
{
const PythonLanguageServerState &lsState = checkPythonLanguageServer(python);
- if (lsState.state == PythonLanguageServerState::CanNotBeInstalled
- || lsState.state == PythonLanguageServerState::AlreadyConfigured) {
+ if (lsState.state == PythonLanguageServerState::CanNotBeInstalled)
+ return;
+ if (lsState.state == PythonLanguageServerState::AlreadyConfigured) {
+ if (const LanguageClient::StdIOSettings *setting = languageServerForPython(python)) {
+ if (LanguageClient::Client *client
+ = LanguageClient::LanguageClientManager::clientForSetting(setting).value(0)) {
+ LanguageClient::LanguageClientManager::reOpenDocumentWithClient(document, client);
+ }
+ }
return;
}