fix #104698 Make query element of uri survive conflict resolution massaging (#104699)

* fix #104698 Make query element of uri survive conflict resolution massaging

* Incorporate PR feedback

* Simplify

* Event simpler, and with comments

* Variant preferred by @bpasero
This commit is contained in:
John Murray
2020-08-17 15:12:26 +02:00
committed by GitHub
parent 6344d2f62c
commit 04f2a740c7
@@ -164,11 +164,12 @@ export class TextFileContentProvider extends Disposable implements ITextModelCon
}
private static resourceToTextFile(scheme: string, resource: URI): URI {
return resource.with({ scheme, query: JSON.stringify({ scheme: resource.scheme }) });
return resource.with({ scheme, query: JSON.stringify({ scheme: resource.scheme, query: resource.query }) });
}
private static textFileToResource(resource: URI): URI {
return resource.with({ scheme: JSON.parse(resource.query)['scheme'], query: null });
const { scheme, query } = JSON.parse(resource.query);
return resource.with({ scheme, query });
}
async provideTextContent(resource: URI): Promise<ITextModel> {