Skip to content

Commit

Permalink
feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
amunger committed May 18, 2023
1 parent b0b5c4e commit 4864d33
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -145,8 +145,6 @@ export abstract class ResourceWorkingCopy extends Disposable implements IResourc

//#region Modified Tracking

// Overridden when the Working Copies need to differentiate between
// dirty and modified e.g. scratchpads
isModified(): boolean {
return this.isDirty();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import { IEditorGroupsService } from 'vs/workbench/services/editor/common/editor
/**
* The working copy backup tracker deals with:
* - restoring backups that exist
* - creating backups for dirty working copies
* - creating backups for modified working copies
* - deleting backups for saved working copies
* - handling backups on shutdown
*/
Expand All @@ -39,8 +39,8 @@ export abstract class WorkingCopyBackupTracker extends Disposable {
) {
super();

// Fill in initial dirty working copies
for (const workingCopy of this.workingCopyService.dirtyWorkingCopies) {
// Fill in initial modified working copies
for (const workingCopy of this.workingCopyService.modifiedWorkingCopies) {
this.onDidRegister(workingCopy);
}

Expand Down Expand Up @@ -114,7 +114,7 @@ export abstract class WorkingCopyBackupTracker extends Disposable {
return;
}

if (workingCopy.isDirty()) {
if (workingCopy.isModified()) {
this.scheduleBackup(workingCopy);
}
}
Expand Down Expand Up @@ -383,7 +383,7 @@ export abstract class WorkingCopyBackupTracker extends Disposable {
}

// Then, resolve each opened editor to make sure the working copy
// is loaded and the dirty editor appears properly
// is loaded and the modified editor appears properly.
// We only do that for editors that are not active in a group
// already to prevent calling `resolve` twice!
await Promises.settled([...openedEditorsForBackups].map(async openedEditorForBackup => {
Expand Down

0 comments on commit 4864d33

Please sign in to comment.