diff --git a/src/command_line.cc b/src/command_line.cc index 2ec3577e..f735e5f5 100644 --- a/src/command_line.cc +++ b/src/command_line.cc @@ -628,6 +628,10 @@ void QueryDbMainLoop( case IpcId::TextDocumentDidSave: { auto msg = static_cast(message.get()); + WorkingFile* working_file = working_files->GetFileByFilename(msg->params.textDocument.uri.GetPath()); + if (working_file) + working_file->changes.clear(); + // Send an index update request. Index_DoIndex request(Index_DoIndex::Type::Update); optional entry = project->FindCompilationEntryForFile(msg->params.textDocument.uri.GetPath());