Fix textDocument/didClose to use TextDocumentIdentifier

This commit is contained in:
Fangrui Song 2018-01-12 18:59:25 -08:00
parent 45cb0b8cc5
commit feb0249350
3 changed files with 3 additions and 3 deletions

View File

@ -6,7 +6,7 @@
namespace {
struct Ipc_TextDocumentDidClose : public IpcMessage<Ipc_TextDocumentDidClose> {
struct Params {
lsTextDocumentItem textDocument;
lsTextDocumentIdentifier textDocument;
};
const static IpcId kIpcId = IpcId::TextDocumentDidClose;

View File

@ -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<std::mutex> lock(files_mutex);
std::string filename = close.uri.GetPath();

View File

@ -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