Fix preview handling so the untitled notebooks are pinned by default (#3405)

This commit is contained in:
Kevin Cunnane
2018-12-03 20:26:42 -08:00
committed by GitHub
parent cac8cc99e1
commit 649c2aa5a6
3 changed files with 3 additions and 2 deletions

View File

@@ -237,6 +237,7 @@ export class ExtHostNotebookDocumentsAndEditors implements ExtHostNotebookDocume
let options: INotebookShowOptions = {};
if (showOptions) {
options.preserveFocus = showOptions.preserveFocus;
options.preview = showOptions.preview;
options.position = showOptions.viewColumn;
options.providerId = showOptions.providerId;
options.connectionId = showOptions.connectionId;

View File

@@ -257,7 +257,7 @@ export class MainThreadNotebookDocumentsAndEditors extends Disposable implements
const editorOptions: ITextEditorOptions = {
preserveFocus: options.preserveFocus,
pinned: options.pinned
pinned: !options.preview
};
let model = new NotebookInputModel(uri, undefined, false, undefined);
let providerId = options.providerId;

View File

@@ -807,7 +807,7 @@ export interface INotebookEditorAddData {
export interface INotebookShowOptions {
position?: EditorViewColumn;
preserveFocus?: boolean;
pinned?: boolean;
preview?: boolean;
providerId?: string;
connectionId?: string;
}