Skip to content

Commit

Permalink
set phase to Restoring *after* kicking off restore, #37541
Browse files Browse the repository at this point in the history
  • Loading branch information
jrieken committed Nov 8, 2017
1 parent b495b84 commit c382934
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/vs/workbench/electron-browser/workbench.ts
Expand Up @@ -311,7 +311,6 @@ export class Workbench implements IPartService {
const editorRestoreClock = time('restore:editors');
const restoredEditors: string[] = [];
restorePromises.push(this.resolveEditorsToOpen().then(inputs => {
this.lifecycleService.phase = LifecyclePhase.Restoring;

let editorOpenPromise: TPromise<IEditor[]>;
if (inputs.length) {
Expand All @@ -320,6 +319,9 @@ export class Workbench implements IPartService {
editorOpenPromise = this.editorPart.restoreEditors();
}

// update lifecycle *after* triggering the editor restore
this.lifecycleService.phase = LifecyclePhase.Restoring;

return editorOpenPromise.then(editors => {
this.handleEditorBackground(); // make sure we show the proper background in the editor area

Expand Down

0 comments on commit c382934

Please sign in to comment.