forked from qt-creator/qt-creator
LanguageClient: remove unused document check
Amends 439bb9c4ae
Change-Id: I783b5f099ffdce2a714f1007e7cc50cda6e211a0
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -85,11 +85,9 @@ bool applyTextDocumentEdit(const Client *client, const TextDocumentEdit &edit)
|
|||||||
return true;
|
return true;
|
||||||
const DocumentUri &uri = edit.textDocument().uri();
|
const DocumentUri &uri = edit.textDocument().uri();
|
||||||
const FilePath &filePath = uri.toFilePath();
|
const FilePath &filePath = uri.toFilePath();
|
||||||
if (TextDocument* doc = TextDocument::textDocumentForFilePath(filePath)) {
|
|
||||||
LanguageClientValue<int> version = edit.textDocument().version();
|
LanguageClientValue<int> version = edit.textDocument().version();
|
||||||
if (!version.isNull() && version.value(0) < client->documentVersion(filePath))
|
if (!version.isNull() && version.value(0) < client->documentVersion(filePath))
|
||||||
return false;
|
return false;
|
||||||
}
|
|
||||||
return applyTextEdits(uri, edits);
|
return applyTextEdits(uri, edits);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user