forked from qt-creator/qt-creator
LanguageClient: deactivate a document if it was opened by the client
Do not always call deactivateDocument for all Core::EditorManager::documentClosed emits containing textDocuments. Change-Id: I5d9bf4c0d634837167fced4202f7edf34952c46d Reviewed-by: Artem Sokolovskii <artem.sokolovskii@qt.io> Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -754,10 +754,10 @@ void Client::cancelRequest(const MessageId &id)
|
||||
void Client::closeDocument(TextEditor::TextDocument *document,
|
||||
const std::optional<FilePath> &overwriteFilePath)
|
||||
{
|
||||
deactivateDocument(document);
|
||||
d->m_postponedDocuments.remove(document);
|
||||
d->m_documentsToUpdate.erase(document);
|
||||
if (d->m_openedDocument.remove(document) != 0) {
|
||||
deactivateDocument(document);
|
||||
handleDocumentClosed(document);
|
||||
if (d->m_state == Initialized)
|
||||
d->sendCloseNotification(overwriteFilePath.value_or(document->filePath()));
|
||||
|
Reference in New Issue
Block a user