mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-25 11:08:51 +01:00
* Addresses #26184 - use configuration for pinned default * Honors the preview editor setting above all * Removes passing undefined to pinned internally re: requested code review changes * Removes unnecessary undefined * feedback
This commit is contained in:
committed by
Benjamin Pasero
parent
b5cd8121f5
commit
4f50b29e92
@@ -205,11 +205,10 @@ export class ExtHostApiCommands {
|
||||
});
|
||||
|
||||
this._register('vscode.diff', (left: URI, right: URI, label: string, options?: vscode.TextDocumentShowOptions) => {
|
||||
|
||||
let editorOptions: IEditorOptions;
|
||||
if (options) {
|
||||
editorOptions = {
|
||||
pinned: !options.preview,
|
||||
pinned: typeof options.preview === 'boolean' ? !options.preview : undefined,
|
||||
preserveFocus: options.preserveFocus
|
||||
};
|
||||
}
|
||||
|
||||
@@ -63,20 +63,18 @@ export class ExtHostEditors extends ExtHostEditorsShape {
|
||||
if (typeof columnOrOptions === 'number') {
|
||||
options = {
|
||||
position: TypeConverters.fromViewColumn(columnOrOptions),
|
||||
preserveFocus: preserveFocus,
|
||||
pinned: true
|
||||
preserveFocus
|
||||
};
|
||||
} else if (typeof columnOrOptions === 'object') {
|
||||
options = {
|
||||
position: TypeConverters.fromViewColumn(columnOrOptions.viewColumn),
|
||||
preserveFocus: columnOrOptions.preserveFocus,
|
||||
pinned: columnOrOptions.preview === undefined ? true : !columnOrOptions.preview
|
||||
pinned: typeof columnOrOptions.preview === 'boolean' ? !columnOrOptions.preview : undefined
|
||||
};
|
||||
} else {
|
||||
options = {
|
||||
position: EditorPosition.ONE,
|
||||
preserveFocus: false,
|
||||
pinned: true
|
||||
preserveFocus: false
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user