Skip to content

Commit

Permalink
Merge branch 'master' of github.com:microsoft/vscode
Browse files Browse the repository at this point in the history
  • Loading branch information
joaomoreno committed Mar 30, 2020
2 parents 7934996 + 7764b06 commit 6f5e1ed
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 9 deletions.
4 changes: 1 addition & 3 deletions src/vs/platform/files/node/diskFileSystemProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -544,10 +544,8 @@ export class DiskFileSystemProvider extends Disposable implements

// Buffer requests for recursive watching to decide on right watcher
// that supports potentially watching more than one folder at once
this.recursiveWatchRequestDelayer.trigger(() => {
this.recursiveWatchRequestDelayer.trigger(async () => {
this.doRefreshRecursiveWatchers();

return Promise.resolve();
});
}

Expand Down
4 changes: 2 additions & 2 deletions src/vs/workbench/browser/parts/editor/editorGroupView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -894,7 +894,7 @@ export class EditorGroupView extends Themable implements IEditorGroupView {
private async doShowEditor(editor: EditorInput, active: boolean, options?: EditorOptions): Promise<IEditorPane | undefined> {

// Show in editor control if the active editor changed
let openEditorPromise: Promise<IEditorPane | undefined>;
let openEditorPromise: Promise<IEditorPane | undefined> | undefined;
if (active) {
openEditorPromise = (async () => {
try {
Expand All @@ -915,7 +915,7 @@ export class EditorGroupView extends Themable implements IEditorGroupView {
}
})();
} else {
openEditorPromise = Promise.resolve(undefined); // inactive: return undefined as result to signal this
openEditorPromise = undefined; // inactive: return undefined as result to signal this
}

// Show in title control after editor control because some actions depend on it
Expand Down
4 changes: 2 additions & 2 deletions src/vs/workbench/common/editor/diffEditorModel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ export class DiffEditorModel extends EditorModel {

async load(): Promise<EditorModel> {
await Promise.all([
this._originalModel ? this._originalModel.load() : Promise.resolve(undefined),
this._modifiedModel ? this._modifiedModel.load() : Promise.resolve(undefined),
this._originalModel?.load(),
this._modifiedModel?.load(),
]);

return this;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ export class NativeBackupTracker extends BackupTracker implements IWorkbenchCont
// If we still have dirty working copies, save those directly
// unless the save was not successful (e.g. cancelled)
if (result !== false) {
await Promise.all(workingCopies.map(workingCopy => workingCopy.isDirty() ? workingCopy.save(saveOptions) : Promise.resolve(true)));
await Promise.all(workingCopies.map(workingCopy => workingCopy.isDirty() ? workingCopy.save(saveOptions) : true));
}
}

Expand All @@ -244,7 +244,7 @@ export class NativeBackupTracker extends BackupTracker implements IWorkbenchCont

// If we still have dirty working copies, revert those directly
// unless the revert operation was not successful (e.g. cancelled)
await Promise.all(workingCopies.map(workingCopy => workingCopy.isDirty() ? workingCopy.revert(revertOptions) : Promise.resolve()));
await Promise.all(workingCopies.map(workingCopy => workingCopy.isDirty() ? workingCopy.revert(revertOptions) : undefined));
}

private noVeto(backupsToDiscard: IWorkingCopy[]): boolean | Promise<boolean> {
Expand Down

0 comments on commit 6f5e1ed

Please sign in to comment.