Skip to content

Commit 50782c1

Browse files
author
Benjamin Pasero
committed
💄
1 parent f1f62df commit 50782c1

2 files changed

Lines changed: 10 additions & 10 deletions

File tree

src/vs/workbench/common/editor/untitledTextEditorModel.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ export class UntitledTextEditorModel extends BaseTextEditorModel implements IUnt
6767
@IModeService modeService: IModeService,
6868
@IModelService modelService: IModelService,
6969
@IBackupFileService private readonly backupFileService: IBackupFileService,
70-
@ITextResourceConfigurationService private readonly configurationService: ITextResourceConfigurationService,
70+
@ITextResourceConfigurationService private readonly textResourceConfigurationService: ITextResourceConfigurationService,
7171
@IWorkingCopyService private readonly workingCopyService: IWorkingCopyService,
7272
@ITextFileService private readonly textFileService: ITextFileService
7373
) {
@@ -82,11 +82,11 @@ export class UntitledTextEditorModel extends BaseTextEditorModel implements IUnt
8282
private registerListeners(): void {
8383

8484
// Config Changes
85-
this._register(this.configurationService.onDidChangeConfiguration(e => this.onConfigurationChange()));
85+
this._register(this.textResourceConfigurationService.onDidChangeConfiguration(e => this.onConfigurationChange()));
8686
}
8787

8888
private onConfigurationChange(): void {
89-
const configuredEncoding = this.configurationService.getValue<string>(this.resource, 'files.encoding');
89+
const configuredEncoding = this.textResourceConfigurationService.getValue<string>(this.resource, 'files.encoding');
9090

9191
if (this.configuredEncoding !== configuredEncoding) {
9292
this.configuredEncoding = configuredEncoding;
@@ -192,7 +192,7 @@ export class UntitledTextEditorModel extends BaseTextEditorModel implements IUnt
192192
}
193193

194194
// Encoding
195-
this.configuredEncoding = this.configurationService.getValue<string>(this.resource, 'files.encoding');
195+
this.configuredEncoding = this.textResourceConfigurationService.getValue<string>(this.resource, 'files.encoding');
196196

197197
// We know for a fact there is a text editor model here
198198
const textEditorModel = this.textEditorModel!;

src/vs/workbench/contrib/files/browser/files.contribution.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -292,18 +292,18 @@ configurationRegistry.registerConfiguration({
292292
'type': 'string',
293293
'enum': [AutoSaveConfiguration.OFF, AutoSaveConfiguration.AFTER_DELAY, AutoSaveConfiguration.ON_FOCUS_CHANGE, AutoSaveConfiguration.ON_WINDOW_CHANGE],
294294
'markdownEnumDescriptions': [
295-
nls.localize({ comment: ['This is the description for a setting. Values surrounded by single quotes are not to be translated.'], key: 'files.autoSave.off' }, "A dirty file is never automatically saved."),
296-
nls.localize({ comment: ['This is the description for a setting. Values surrounded by single quotes are not to be translated.'], key: 'files.autoSave.afterDelay' }, "A dirty file is automatically saved after the configured `#files.autoSaveDelay#`."),
297-
nls.localize({ comment: ['This is the description for a setting. Values surrounded by single quotes are not to be translated.'], key: 'files.autoSave.onFocusChange' }, "A dirty file is automatically saved when the editor loses focus."),
298-
nls.localize({ comment: ['This is the description for a setting. Values surrounded by single quotes are not to be translated.'], key: 'files.autoSave.onWindowChange' }, "A dirty file is automatically saved when the window loses focus.")
295+
nls.localize({ comment: ['This is the description for a setting. Values surrounded by single quotes are not to be translated.'], key: 'files.autoSave.off' }, "A dirty editor is never automatically saved."),
296+
nls.localize({ comment: ['This is the description for a setting. Values surrounded by single quotes are not to be translated.'], key: 'files.autoSave.afterDelay' }, "A dirty editor is automatically saved after the configured `#files.autoSaveDelay#`."),
297+
nls.localize({ comment: ['This is the description for a setting. Values surrounded by single quotes are not to be translated.'], key: 'files.autoSave.onFocusChange' }, "A dirty editor is automatically saved when the editor loses focus."),
298+
nls.localize({ comment: ['This is the description for a setting. Values surrounded by single quotes are not to be translated.'], key: 'files.autoSave.onWindowChange' }, "A dirty editor is automatically saved when the window loses focus.")
299299
],
300300
'default': platform.isWeb ? AutoSaveConfiguration.AFTER_DELAY : AutoSaveConfiguration.OFF,
301-
'markdownDescription': nls.localize({ comment: ['This is the description for a setting. Values surrounded by single quotes are not to be translated.'], key: 'autoSave' }, "Controls auto save of dirty files. Read more about autosave [here](https://code.visualstudio.com/docs/editor/codebasics#_save-auto-save).", AutoSaveConfiguration.OFF, AutoSaveConfiguration.AFTER_DELAY, AutoSaveConfiguration.ON_FOCUS_CHANGE, AutoSaveConfiguration.ON_WINDOW_CHANGE, AutoSaveConfiguration.AFTER_DELAY)
301+
'markdownDescription': nls.localize({ comment: ['This is the description for a setting. Values surrounded by single quotes are not to be translated.'], key: 'autoSave' }, "Controls auto save of dirty editors. Read more about autosave [here](https://code.visualstudio.com/docs/editor/codebasics#_save-auto-save).", AutoSaveConfiguration.OFF, AutoSaveConfiguration.AFTER_DELAY, AutoSaveConfiguration.ON_FOCUS_CHANGE, AutoSaveConfiguration.ON_WINDOW_CHANGE, AutoSaveConfiguration.AFTER_DELAY)
302302
},
303303
'files.autoSaveDelay': {
304304
'type': 'number',
305305
'default': 1000,
306-
'markdownDescription': nls.localize({ comment: ['This is the description for a setting. Values surrounded by single quotes are not to be translated.'], key: 'autoSaveDelay' }, "Controls the delay in ms after which a dirty file is saved automatically. Only applies when `#files.autoSave#` is set to `{0}`.", AutoSaveConfiguration.AFTER_DELAY)
306+
'markdownDescription': nls.localize({ comment: ['This is the description for a setting. Values surrounded by single quotes are not to be translated.'], key: 'autoSaveDelay' }, "Controls the delay in ms after which a dirty editor is saved automatically. Only applies when `#files.autoSave#` is set to `{0}`.", AutoSaveConfiguration.AFTER_DELAY)
307307
},
308308
'files.watcherExclude': {
309309
'type': 'object',

0 commit comments

Comments
 (0)