提交 8a172c19 编写于 作者: B Benjamin Pasero

editors - improve closeAll action to ignore save/revert result and rather check for dirty state

上级 8d7d2f60
......@@ -642,14 +642,13 @@ export abstract class BaseCloseAllAction extends Action {
return;
}
let saveOrRevert: boolean;
if (confirm === ConfirmResult.DONT_SAVE) {
saveOrRevert = await this.editorService.revertAll({ soft: true, includeUntitled: true });
await this.editorService.revertAll({ soft: true, includeUntitled: true });
} else {
saveOrRevert = await this.editorService.saveAll({ reason: SaveReason.EXPLICIT, includeUntitled: true });
await this.editorService.saveAll({ reason: SaveReason.EXPLICIT, includeUntitled: true });
}
if (saveOrRevert) {
if (!this.workingCopyService.hasDirty) {
return this.doCloseAll();
}
}
......
......@@ -1034,10 +1034,6 @@ export class EditorService extends Disposable implements EditorServiceImpl {
return true; // might have been disposed from from the revert already
}
if (!editor.isDirty() && !options?.force) {
return true; // skip over non-dirty editors unless we force to revert
}
// Use revert as a hint to pin the editor
this.editorGroupService.getGroup(groupId)?.pinEditor(editor);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册