提交 9d887e28 编写于 作者: B Benjamin Pasero

web - enable hot exit by default again

上级 4c7e2999
......@@ -22,7 +22,7 @@ export class BrowserLifecycleService extends AbstractLifecycleService {
}
private registerListeners(): void {
window.addEventListener('beforeunload', () => this.beforeUnload());
window.onbeforeunload = () => this.beforeUnload();
}
private beforeUnload(): string | null {
......
......@@ -311,7 +311,7 @@ configurationRegistry.registerConfiguration({
'type': 'string',
'scope': ConfigurationScope.APPLICATION,
'enum': [HotExitConfiguration.OFF, HotExitConfiguration.ON_EXIT, HotExitConfiguration.ON_EXIT_AND_WINDOW_CLOSE],
'default': platform.isWeb ? HotExitConfiguration.OFF : HotExitConfiguration.ON_EXIT, // TODO@Ben enable once supported
'default': HotExitConfiguration.ON_EXIT,
'markdownEnumDescriptions': [
nls.localize('hotExit.off', 'Disable hot exit.'),
nls.localize('hotExit.onExit', 'Hot exit will be triggered when the last window is closed on Windows/Linux or when the `workbench.action.quit` command is triggered (command palette, keybinding, menu). All windows with backups will be restored upon next launch.'),
......
......@@ -310,7 +310,7 @@ class BackupFileServiceImpl implements IBackupFileService {
return contents.substr(0, newLineIndex);
}
throw new Error(`Could not find ${matchingString} in first ${maximumBytesToRead} bytes of ${file}`);
throw new Error(`Could not find ${JSON.stringify(matchingString)} in first ${maximumBytesToRead} bytes of ${file}`);
}
async resolveBackupContent<T extends object>(backup: URI): Promise<IResolvedBackup<T>> {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册