mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-15 01:25:36 -05:00
Fix preview handling so the untitled notebooks are pinned by default (#3405)
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -807,7 +807,7 @@ export interface INotebookEditorAddData {
|
||||
export interface INotebookShowOptions {
|
||||
position?: EditorViewColumn;
|
||||
preserveFocus?: boolean;
|
||||
pinned?: boolean;
|
||||
preview?: boolean;
|
||||
providerId?: string;
|
||||
connectionId?: string;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user