mirror of
https://github.com/microsoft/vscode.git
synced 2026-09-26 18:06:43 +01:00
* 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:
@@ -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> {
|
||||
|
||||
Reference in New Issue
Block a user