提交 5c85e78b 编写于 作者: B Benjamin Pasero

config - fix issues now that config if frozen

上级 06034248
......@@ -56,6 +56,7 @@ import { widgetShadow, editorWidgetBackground } from 'vs/platform/theme/common/c
// tslint:disable-next-line:import-patterns
import { IPreferencesService } from 'vs/workbench/parts/preferences/common/preferences';
import { ConfigurationTarget } from 'vs/platform/configuration/common/configuration';
import { clone } from 'vs/base/common/objects';
function toEditorWithEncodingSupport(input: IEditorInput): IEncodingSupport {
if (input instanceof SideBySideEditorInput) {
......@@ -977,7 +978,7 @@ export class ChangeModeAction extends Action {
}
// Make sure to write into the value of the target and not the merged value from USER and WORKSPACE config
let currentAssociations = (target === ConfigurationTarget.WORKSPACE) ? fileAssociationsConfig.workspace : fileAssociationsConfig.user;
let currentAssociations = clone((target === ConfigurationTarget.WORKSPACE) ? fileAssociationsConfig.workspace : fileAssociationsConfig.user);
if (!currentAssociations) {
currentAssociations = Object.create(null);
}
......
......@@ -143,8 +143,8 @@ export class FileService implements IFileService {
}
private onConfigurationChange(event: IConfigurationChangeEvent): void {
if (event.affectsConfiguration('files')) {
this.updateOptions(this.configurationService.getConfiguration<IFilesConfiguration>('files'));
if (event.affectsConfiguration('files.useExperimentalFileWatcher')) {
this.updateOptions({ useExperimentalFileWatcher: this.configurationService.getValue<boolean>('files.useExperimentalFileWatcher') });
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册