提交 60526cb4 编写于 作者: B Benjamin Pasero

rename closeTabsInMRUOrder to focusRecentEditorAfterClose (for #43459)

上级 371c853f
......@@ -30,7 +30,7 @@ export const DEFAULT_EDITOR_PART_OPTIONS: IEditorPartOptions = {
highlightModifiedTabs: false,
tabCloseButton: 'right',
tabSizing: 'fit',
closeTabsInMRUOrder: true,
focusRecentEditorAfterClose: true,
showIcons: true,
enablePreview: true,
openPositioning: 'right',
......
......@@ -58,9 +58,9 @@ configurationRegistry.registerConfiguration({
],
'description': nls.localize({ comment: ['This is the description for a setting. Values surrounded by single quotes are not to be translated.'], key: 'tabSizing' }, "Controls the sizing of editor tabs.")
},
'workbench.editor.closeTabsInMRUOrder': {
'workbench.editor.focusRecentEditorAfterClose': {
'type': 'boolean',
'description': nls.localize('closeTabsInMRUOrder', "Controls whether tabs are closed in most recently used order or from left to right."),
'description': nls.localize('focusRecentEditorAfterClose', "Controls whether tabs are closed in most recently used order or from left to right."),
'default': true
},
'workbench.editor.showIcons': {
......
......@@ -941,7 +941,7 @@ export interface IWorkbenchEditorPartConfiguration {
highlightModifiedTabs?: boolean;
tabCloseButton?: 'left' | 'right' | 'off';
tabSizing?: 'fit' | 'shrink';
closeTabsInMRUOrder?: boolean;
focusRecentEditorAfterClose?: boolean;
showIcons?: boolean;
enablePreview?: boolean;
enablePreviewFromQuickOpen?: boolean;
......
......@@ -98,7 +98,7 @@ export class EditorGroup extends Disposable {
private active: EditorInput | null; // editor in active state
private editorOpenPositioning: 'left' | 'right' | 'first' | 'last';
private closeTabsInMRUOrder: boolean;
private focusRecentEditorAfterClose: boolean;
constructor(
labelOrSerializedGroup: ISerializedEditorGroup,
......@@ -123,7 +123,7 @@ export class EditorGroup extends Disposable {
private onConfigurationUpdated(event?: IConfigurationChangeEvent): void {
this.editorOpenPositioning = this.configurationService.getValue('workbench.editor.openPositioning');
this.closeTabsInMRUOrder = this.configurationService.getValue('workbench.editor.closeTabsInMRUOrder');
this.focusRecentEditorAfterClose = this.configurationService.getValue('workbench.editor.focusRecentEditorAfterClose');
}
get id(): GroupIdentifier {
......@@ -335,7 +335,7 @@ export class EditorGroup extends Disposable {
// More than one editor
if (this.mru.length > 1) {
let newActive: EditorInput;
if (this.closeTabsInMRUOrder) {
if (this.focusRecentEditorAfterClose) {
newActive = this.mru[1]; // active editor is always first in MRU, so pick second editor after as new active
} else {
if (index === this.editors.length - 1) {
......
......@@ -29,7 +29,7 @@ function inst(): IInstantiationService {
inst.stub(ITelemetryService, NullTelemetryService);
const config = new TestConfigurationService();
config.setUserConfiguration('workbench', { editor: { openPositioning: 'right', closeTabsInMRUOrder: true } });
config.setUserConfiguration('workbench', { editor: { openPositioning: 'right', focusRecentEditorAfterClose: true } });
inst.stub(IConfigurationService, config);
return inst;
......@@ -653,7 +653,7 @@ suite('Workbench editor groups', () => {
inst.stub(ITelemetryService, NullTelemetryService);
const config = new TestConfigurationService();
config.setUserConfiguration('workbench', { editor: { closeTabsInMRUOrder: false } });
config.setUserConfiguration('workbench', { editor: { focusRecentEditorAfterClose: false } });
inst.stub(IConfigurationService, config);
const group = inst.createInstance(EditorGroup);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册