mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-27 03:54:24 +01:00
Revert "improve revert logic for untitled"
This reverts commit 0256f00d8d.
This commit is contained in:
@@ -36,11 +36,6 @@ export interface IUntitledEditorService {
|
||||
*/
|
||||
isDirty(resource: URI): boolean;
|
||||
|
||||
/**
|
||||
* Reverts the untitled resources if found.
|
||||
*/
|
||||
revertAll(resources?: URI[]): URI[];
|
||||
|
||||
/**
|
||||
* Creates a new untitled input with the optional resource URI or returns an existing one
|
||||
* if the provided resource exists already as untitled input.
|
||||
@@ -77,21 +72,6 @@ export class UntitledEditorService implements IUntitledEditorService {
|
||||
return Object.keys(UntitledEditorService.CACHE).map((key) => UntitledEditorService.CACHE[key]);
|
||||
}
|
||||
|
||||
public revertAll(resources?: URI[], force?: boolean): URI[] {
|
||||
const reverted: URI[] = [];
|
||||
|
||||
const untitledInputs = this.getAll(resources);
|
||||
untitledInputs.forEach(input => {
|
||||
if (input) {
|
||||
input.revert();
|
||||
|
||||
reverted.push(input.getResource());
|
||||
}
|
||||
});
|
||||
|
||||
return reverted;
|
||||
}
|
||||
|
||||
public isDirty(resource: URI): boolean {
|
||||
let input = this.get(resource);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user