From feb024935025a89800c845d2ab6f7b0edfe27306 Mon Sep 17 00:00:00 2001 From: Fangrui Song Date: Fri, 12 Jan 2018 18:59:25 -0800 Subject: [PATCH] Fix textDocument/didClose to use TextDocumentIdentifier --- src/messages/text_document_did_close.cc | 2 +- src/working_files.cc | 2 +- src/working_files.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/messages/text_document_did_close.cc b/src/messages/text_document_did_close.cc index fcafa4c6..23549f6d 100644 --- a/src/messages/text_document_did_close.cc +++ b/src/messages/text_document_did_close.cc @@ -6,7 +6,7 @@ namespace { struct Ipc_TextDocumentDidClose : public IpcMessage { struct Params { - lsTextDocumentItem textDocument; + lsTextDocumentIdentifier textDocument; }; const static IpcId kIpcId = IpcId::TextDocumentDidClose; diff --git a/src/working_files.cc b/src/working_files.cc index 83af2872..62976f07 100644 --- a/src/working_files.cc +++ b/src/working_files.cc @@ -356,7 +356,7 @@ void WorkingFiles::OnChange(const lsTextDocumentDidChangeParams& change) { } } -void WorkingFiles::OnClose(const lsTextDocumentItem& close) { +void WorkingFiles::OnClose(const lsTextDocumentIdentifier& close) { std::lock_guard lock(files_mutex); std::string filename = close.uri.GetPath(); diff --git a/src/working_files.h b/src/working_files.h index 7d66b68b..67339b77 100644 --- a/src/working_files.h +++ b/src/working_files.h @@ -104,7 +104,7 @@ struct WorkingFiles { WorkingFile* OnOpen(const lsTextDocumentItem& open); void OnChange(const lsTextDocumentDidChangeParams& change); - void OnClose(const lsTextDocumentItem& close); + void OnClose(const lsTextDocumentIdentifier& close); // If |filter_paths| is non-empty, only files which contain any of the given // strings. For example, {"foo", "bar"} means that every result has either the