#4418: Notebook file icon doesn't show for new notebook (#4676)

* #4418: Notebook icon doesn't load for untitled

* Indentation

* Indentation
This commit is contained in:
Raj
2019-03-25 16:05:04 -07:00
committed by GitHub
parent 1bac929ab3
commit 83c8baf8e3
2 changed files with 16 additions and 3 deletions

View File

@@ -371,12 +371,16 @@ export class MainThreadNotebookDocumentsAndEditors extends Disposable implements
let isUntitled: boolean = uri.scheme === Schemas.untitled;
const fileInput = isUntitled ? this._untitledEditorService.createOrGet(uri, notebookModeId) :
this._editorService.createInput({resource: uri, language: notebookModeId});
this._editorService.createInput({ resource: uri, language: notebookModeId });
let input = this._instantiationService.createInstance(NotebookInput, path.basename(uri.fsPath), uri, fileInput);
input.isTrusted = isUntitled;
input.defaultKernel = options.defaultKernel;
input.connectionProfile = new ConnectionProfile(this._capabilitiesService, options.connectionProfile);
if (isUntitled) {
let untitledModel = await input.textInput.resolve();
untitledModel.load();
input.untitledEditorModel = untitledModel;
}
let editor = await this._editorService.openEditor(input, editorOptions, viewColumnToEditorGroup(this._editorGroupService, options.position));
if (!editor) {
return undefined;