提交 921657de 编写于 作者: B Benjamin Pasero

untitled - ignore default language when associated path

上级 d5501a72
......@@ -188,9 +188,12 @@ export class UntitledEditorService implements IUntitledEditorService {
} while (Object.keys(UntitledEditorService.CACHE).indexOf(resource.toString()) >= 0);
}
const configuration = this.configurationService.getConfiguration<IFilesConfiguration>();
if (!modeId && configuration.files && configuration.files.defaultLanguage) {
modeId = configuration.files.defaultLanguage;
// Look up default language from settings if any
if (!modeId && !hasAssociatedFilePath) {
const configuration = this.configurationService.getConfiguration<IFilesConfiguration>();
if (configuration.files && configuration.files.defaultLanguage) {
modeId = configuration.files.defaultLanguage;
}
}
const input = this.instantiationService.createInstance(UntitledEditorInput, resource, hasAssociatedFilePath, modeId, initialValue);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册