perf - introduce and use "soft" revert when closing all editors

This commit is contained in:
Benjamin Pasero
2016-12-15 09:36:30 +01:00
parent fc0daf6d85
commit 0a073fa0dd
5 changed files with 64 additions and 17 deletions

View File

@@ -590,7 +590,7 @@ export class CloseAllEditorsAction extends Action {
let saveOrRevertPromise: TPromise<boolean>;
if (confirm === ConfirmResult.DONT_SAVE) {
saveOrRevertPromise = this.textFileService.revertAll().then(() => true);
saveOrRevertPromise = this.textFileService.revertAll(null, { soft: true }).then(() => true);
} else {
saveOrRevertPromise = this.textFileService.saveAll(true).then(res => res.results.every(r => r.success));
}