diff options
Diffstat (limited to 'src/plugins/languageclient')
-rw-r--r-- | src/plugins/languageclient/languageclientutils.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/plugins/languageclient/languageclientutils.cpp b/src/plugins/languageclient/languageclientutils.cpp index d05c2b9ded..437c00fed2 100644 --- a/src/plugins/languageclient/languageclientutils.cpp +++ b/src/plugins/languageclient/languageclientutils.cpp @@ -85,11 +85,9 @@ bool applyTextDocumentEdit(const Client *client, const TextDocumentEdit &edit) return true; const DocumentUri &uri = edit.textDocument().uri(); const FilePath &filePath = uri.toFilePath(); - if (TextDocument* doc = TextDocument::textDocumentForFilePath(filePath)) { - LanguageClientValue<int> version = edit.textDocument().version(); - if (!version.isNull() && version.value(0) < client->documentVersion(filePath)) - return false; - } + LanguageClientValue<int> version = edit.textDocument().version(); + if (!version.isNull() && version.value(0) < client->documentVersion(filePath)) + return false; return applyTextEdits(uri, edits); } |