Merge 02d4d73256
into 153a028f3b
This commit is contained in:
commit
a1b9fff887
|
@ -235,6 +235,13 @@ export interface IEditorOptions {
|
|||
*/
|
||||
revealIfOpened?: boolean;
|
||||
|
||||
/**
|
||||
* Controls whether editors opened from Quick Open will always open in the currently active editor group.
|
||||
* Similar to setting the 'revealIfOpened' setting to false, this will open multiple copies of an editor in
|
||||
* different editor groups.
|
||||
*/
|
||||
alwaysOpenInActiveGroupFromQuickOpen?: boolean;
|
||||
|
||||
/**
|
||||
* An editor that is pinned remains in the editor stack even when another editor is being opened.
|
||||
* An editor that is not pinned will always get replaced by another editor that is not pinned.
|
||||
|
|
|
@ -179,7 +179,13 @@ export abstract class BaseEditorQuickAccessProvider extends PickerQuickAccessPro
|
|||
|
||||
return TriggerAction.NO_ACTION;
|
||||
},
|
||||
accept: (keyMods, event) => this.editorGroupService.getGroup(groupId)?.openEditor(editor, { preserveFocus: event.inBackground }),
|
||||
accept: (keyMods, event) => {
|
||||
if (this.editorGroupService.partOptions.alwaysOpenInActiveGroupFromQuickOpen) {
|
||||
this.editorGroupService.activeGroup?.openEditor(editor, { preserveFocus: event.inBackground });
|
||||
} else {
|
||||
this.editorGroupService.getGroup(groupId)?.openEditor(editor, { preserveFocus: event.inBackground });
|
||||
}
|
||||
},
|
||||
};
|
||||
});
|
||||
}
|
||||
|
|
|
@ -162,6 +162,11 @@ const registry = Registry.as<IConfigurationRegistry>(ConfigurationExtensions.Con
|
|||
'markdownDescription': localize('enablePreviewFromQuickOpen', "Controls whether editors opened from Quick Open show as preview. Preview editors do not keep open and are reused until explicitly set to be kept open (e.g. via double click or editing). This value is ignored when `#workbench.editor.enablePreview#` is disabled."),
|
||||
'default': false
|
||||
},
|
||||
'workbench.editor.alwaysOpenInActiveGroupFromQuickOpen': {
|
||||
'type': 'boolean',
|
||||
'markdownDescription': localize('alwaysOpenInActiveGroupFromQuickOpen', "Controls whether editors opened from Quick Open will always open in the currently active Editor Group."),
|
||||
'default': false
|
||||
},
|
||||
'workbench.editor.enablePreviewFromCodeNavigation': {
|
||||
'type': 'boolean',
|
||||
'markdownDescription': localize('enablePreviewFromCodeNavigation', "Controls whether editors remain in preview when a code navigation is started from them. Preview editors do not keep open and are reused until explicitly set to be kept open (e.g. via double click or editing). This value is ignored when `#workbench.editor.enablePreview#` is disabled."),
|
||||
|
|
|
@ -850,6 +850,7 @@ interface IEditorPartConfiguration {
|
|||
closeEmptyGroups?: boolean;
|
||||
autoLockGroups?: Set<string>;
|
||||
revealIfOpen?: boolean;
|
||||
alwaysOpenInActiveGroupFromQuickOpen?: boolean;
|
||||
mouseBackForwardToNavigate?: boolean;
|
||||
labelFormat?: 'default' | 'short' | 'medium' | 'long';
|
||||
restoreViewState?: boolean;
|
||||
|
|
Loading…
Reference in a new issue